ManinGreen ManinGreen - 1 year ago 82
Git Question

can we Commit on Branch that's already been merged with master?

I need to ask a simple question. I'm bit confused.

I have a branch, say "XYZ", I worked and did few commits on that branch and later merged it with my master branch. Now, I want to do some more changes in my code and want to use that same branch. Can I use it again ? and then merge the new commits with master again ? or the only solution is to create another branch ?

p.s: sorry new to git.


Answer Source

You can still work on that branch as it still exists. git-merge:

Incorporates changes from the named commits (since the time their histories diverged from the current branch) into the current branch.

You can continue working on your branch and then when you merge with master again, it will bring the commits that are missing on master.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download