Back to the point that I was thinking for this post... I wanted to commit some experimental changes to test them before merging into master and I created a new branch; tested the changes, merged them into the master branch again, removed the now unused experimental branch and pushed the changes to the remote repo. After pushing the changes, the remote repo still showed up that the branch that I had just removed was still there... why's that?
Of course the answer was that you have to update the refs in remote, otherwise it doesn't know what changes you did locally! in short, to push your branch in remote repo:
$ git push origin branch
and to remove your local and remote branch (once merged into master or other branch):
$ git push origin :
Knowing this surely will help me in the future! I have still to learn a lot about it.
No comments:
Post a Comment