Just a tiny git snippet for those, who are not familiar with git. So here we go:
Create repo
mkdir new_project
cd new_project
git init
touch README.MD
git add .
git commit -a -m "initial commit"
or clone existing repo
for example - existing github repo
git clone git@github.com:username/some_existing_project.git
cd some_existing_project
if you want to keep track repo:
git remote add upstream git://github.com/username/some_existing_project.git
git fetch upstream
Create branch
git checkout -b dev
Now we have a special branch
dev for development. After some changes are made, and some task is complete, we may want to merge them with original branch. Actually better use not usual
merge command, but more powerfull
rebase So:
Commit and rebase
git add .
git commit -a -m "Commit message. Write some small one row title about the problem solved."
git checkout master
git pull
git checkout dev
git rebase master
Solve rebase conflicts
If there are some conflicts, you should solve them by any merge-helper tool (IDE's usually have them), or manually. Then
git add .
git rebase --continue
or if you want to abort rebase
git rebase --abort
after succesfull rebase you may want to push changes to the origin gitrepo
Push to origin
git checkout master
git merge dev
git push
git checkout dev
That's all. This is all basis that you need to work with git. More complex actions may appear, but they are not so often.
Here are some links: