git workflow
Note: please use git manual to get to know what each git command is actually doing. Divide feature on which you are working in short working deliverables. That means when you are done with your implementation and unit testing, you can merge to master branch and delete your small feature branch.
Clone repository (repository will be called repo furthermore in this wiki.)
mkdir ~/reposcd reposgit clone git@github.com:karlosmid/repo_name.gitcd repo_nameGet latest code from remote
git statusgit checkout mastergit pull --rebaseStart working on feature_name. Be sure that feature scope is small as possible. We want your contribution to master as soon as possible!
git branch -a List of all repo branches, remote and localgit checkout -b feature_name Creates feature branch with name feature_name from master branchgit statusgit push -u origin feature_name put feature branch to remote repoDo your work in feature branch. Commit as much as possible.
git checkout feature_name To be sure that you are in appropriate feature branch.git add .git commit -m 'something useful and funny'Send commits to remote repo branch
git rebase -i @{u}git push -u origin feature_nameCode is ready for master after a lot of testing!
git checkout mastergit merge --no-ff feature_namegrep -H -r '<<<<<<< HEAD' * | less -check for conflicts. Resolve them using your favourite editorgit commit -m 'merge from to'git rebase -i @{u}git push -u origin masterMore on that topic could be found here.
Thank, you feature_name branch, we are done! Your life must be shorter than butterflies!
git push origin :feature_namegit branch -d feature_name