I am newbie using Gerrit and has experience in GitLab and Github. So my problem is I created new feature branch from master locally and then push it to remote repository. That part works fine and new branch can be seen in Remote location. But when I do so change in feature branch and commit and try to push it to feature branch. All my changes going to master branch. I don't why?
I double checked my location running following command. git branch ( and pointer pointing to my feature branch)
Can someone help to understand what's going on here.
CodePudding user response:
git branch
is not enough: try and check the output of git branch -avv
to see local and remote tracking branches.
Combine that with git status
, to check which branch you are currently using.
Then you can make sure:
- you actually are using feature branch
- feature branch is indeed linked to an upstream branch.
But in the case of Gerrit, make sure to push using the right URL: see Gerrit push.