I'm starting out using Git + GitHub.
In our distributed team, each member is creating their own branch for each issue/requirement they are allocated.
git branch Issue#1 <-- create this branch
git checkout issue#1 <-- switch over to this branch
now code code
, commit
, code
, commit
, etc...
then pull request
, code-fixup
, commit
, code
, commit
.. etc.
and finally the pull request is accepted.
But, now what?
Does the person who created the branch on their local dev machine need to close off the branch? A suggestion was for the dev person to delete the branch ( ... -D ...)
and then do a pull / refresh of the master .. which then will get all their branch code.
after complete the code first merge branch to master then delete that branch
git checkout master
git merge <branch-name>
git branch -d <branch-name>
Yes, just delete the branch by running git push origin :branchname
. To fix a new issue later, branch off from master again.
Source: Stackoverflow.com