3

I created a new branch (tags), checked it out, and whenever I push changes I use git push origin tags. However, the pushed changes are effecting both the master branch and the tags branch in my remote repo.

I'm sure I've got the tags branch checked out (verified with git status). Can someone tell me what I'm doing wrong? I'm a git newbie and so I'm not sure what I might need to include in this post to help with the diagnosis, let me know if I should include something specific.

Thanks!

Adam
  • 8,752
  • 12
  • 54
  • 96

1 Answers1

0

Nothing, except "tags" is not the best name for a branch name.

When you push tags, it will add to origin/tags, not origin/master.

The best practice would be:

git push -u origin tags

That would link the local branch to it upstream one origin/tags.
See the output of git branch -avv.

And if you checkout master, you will see that the commits done in branch tags are no longer there.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250