This is a basic hands on tutorial on understanding Rebasing in Git.
It will use the git command line interface and assumes that you understand basic git workflow and the commands.
E.g:
git initgit addgit commit -m "commit message"git push
- Create a new repository by creating a folder in your file explorer called
GitRebaseTutorial - Open up Git Bash and navigate to this folder and initialise your repository using the command
git init
- Create a new text file in the the GitRebaseTutorial folder and call it
TextFile1.txt - In this text file, write the text
This is my first commit inside TextFile1 - Commit this text file in git
- In git bash, enter the command
git add TextFile1.txt - Enter the command
git commit -m "Add first line in TextFile1.txt"
- In git bash, enter the command