28

I have a branch feature/xyz-functionality which I wanted to merge with develop branch. I created 3 days ago and I don't have rights for merging.

On the other hand my team lead is busy in other stuff, and in this period I wrote more script which I need push it, since I created merge request I am afraid to push commit on it.

So what is the good practice, I should push commit on it? Can I? or I should create new branch and then push it?

Kindly guide me about it, I would really appreciate. Thank you so much.

Adrian W
  • 4,563
  • 11
  • 38
  • 52
Imran Abbas
  • 755
  • 1
  • 7
  • 24

6 Answers6

25

You can push commits to the same branch and they will get added to the pull request you have already open. For the question is it good practice, it really depends on your organization...

vale
  • 1,376
  • 11
  • 25
2

You can commit and push to the same branch as well create a new branch.

I would prefer to push to the same branch(if not merged yet) if the changes are for the same story and create a new branch if they are for a different story.

Sagar Chaudhary
  • 1,343
  • 7
  • 21
0

Yes you can being on a new branch doesn't stop you from using a commit.

0

Yes can push commit to the same branch or to different branches. It is vice versa

0

Yes, every commit is recorded as long as you specify your commit messages

-3

You should create a new branch and update it with your new code, then use git add --all, then commit and push, this would pop for you to make a pull request on the git hub account.. but if you want to change branches, use git checkout < branch name>