clearing doubts on when to use git rebase and git merge
so do I use git rebase when I am getting the changes from the main/parent branch to the feature/working branch and git merge when getting the changes from child/feature branch to main branch ?
clearing doubts on when to use git rebase and git merge
so do I use git rebase when I am getting the changes from the main/parent branch to the feature/working branch and git merge when getting the changes from child/feature branch to main branch ?
Keep branch structure during git rebase
Let’s say I have the following tree:
Keep branch structure during git rebase
Let’s say I have the following tree:
Keep branch structure during git rebase
Let’s say I have the following tree:
Keep branch structure during git rebase
Let’s say I have the following tree:
Checking a PR’s commits are all descendants of destination branch
In our team we have a requirement for our PRs: they need to be rebased before being merged, in order to achieve a “semi-linear history”. I’m looking for an automated way to evaluate this requirement (we know how to run a script as part of GitHub’s checks, but I need help with the git commands that make the evaluation itself). For now we only need to determine if a rebase is necessary.
How can you rebase a branch that is tracked remotely?
We’ve got a development branch, dev1. Starting from that, I create a feature branch, f1 and push to our git server:
What are the git commands to rebase a child-branch whose parent branch has been rebased?
NOTE: This is different from the question here Is there a way to rebase a child branch after the parent has been rebased? in that the child-branch is not “up to date” with the parent branch at the time the parent is rebased.
Should I use exec in git rebase to modify the repo?
Sometimes I want to make a change to several previous commits and I wonder if using the exec command in a rebase is a good solution. I think the only use of it I’ve seen is to compile or run tests to verify the rebase didn’t introduce broken code.