3 ms·
Knowing the name of the branch is not enough to find the commits. With Git, a branch is just a kind of moving tag on the last commit. The problem mentioned in
by idoubtit 6y ago
Knowing the name of the branch is not enough to find the commits. With Git, a branch is just a kind of moving tag on the last commit.
The problem mentioned in this thread is rolling back a feature that was merged. The only solution I know is navigating the log to find the first commit on the branch from which to revert. Don't forget there may have been several merges from and to master, as well as commits shared with other git branches that should not be reverted.
In a Mercurial branch, each commit is tagged with the branch name. Unamed branches, à la Git, are called "bookmarks".
- nemetroid 6y ago> The only solution I know is navigating the log to find the first commit on the branch from which to revert. Don't forget there may have been several merges from and to master, as well as commits shared with other git branches that should not be reverted. The only step necessary to revert the changes from a merged branch is to revert the merge commit. See: https://stackoverflow.com/questions/7099833/how-to-revert-a-merge-commit-thats-already-pushed-to-remote-branch https://stackoverflow.com/questions/7099833/how-to-revert-a-... https://github.com/git/git/blob/master/Documentation/howto/revert-a-faulty-merge.txt https://github.com/git/git/blob/master/Documentation/howto/r...