- (HEAD -> master) Add feature-one.txt
- Feature one: change in file.txt
- Previous commits on master...
Last active
July 6, 2024 21:37
-
-
Save heridev/244e75dbe2e21430b093d7c6ee4f8b4b to your computer and use it in GitHub Desktop.
git rebase content for blog - https://elh.mx/latest/looking-into-git-rebase-and-how-it-looks-in-the-commit-history/
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git checkout master | |
git branch feature-one | |
git branch feature-two |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git checkout feature-one | |
echo "Change in feature-one" >> file.txt | |
git add file.txt | |
git commit -m "Feature one: change in file.txt" | |
echo "This is feature-one.txt" > feature-one.txt | |
git add feature-one.txt | |
git commit -m "Add feature-one.txt" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git checkout feature-two | |
echo "Change in feature-two" >> file.txt | |
git add file.txt | |
git commit -m "Feature two: change in file.txt" | |
echo "This is feature-two.txt" > feature-two.txt | |
git add feature-two.txt | |
git commit -m "Add feature-two.txt" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git checkout master | |
git rebase feature-one |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git rebase feature-two |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Edit file.txt to resolve the conflict | |
git add file.txt | |
git rebase --continue |
- (HEAD -> master) Add feature-two.txt
- Feature two: change in file.txt
- Add feature-one.txt
- Feature one: change in file.txt
- Previous commits on master...
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment