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.
Merge branchesMerging your branch into master is the most common way to do this. Git creates a new commit (M) that is referred to as a merge commit that results from combining the changes from your feature branch and master from the point where the two branches diverged.
You can commit changes on a pull request branch that was created from a fork of your repository with permission from the pull request creator. You can only make commits on pull request branches that: are opened in a repository that you have push access to and that were created from a fork of that repository.
If you need to update a merge request (for example in response to a request from the review shifter), simply push to the same branch again after editing (and testing) the files.
Ideally, you'd like it to be clean before you attempt to merge in remote changes (remember, git pull = git fetch + git merge ). git commit is one way of accomplishing this, but it will alter your history--thereby polluting it if you're concerned about leaving your repo in a constantly working state.
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...
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With