How-To-Git-Started/visualize-git.md

31 lines
545 B
Markdown
Raw Normal View History

2020-01-15 15:38:52 +01:00
# Visualize git
## commands
2020-01-15 15:59:12 +01:00
### Adding commits
git commit -m "message 1" <br/>
git commit -m "message 2" <br/>
git commit -m "message 3" <br/>
2020-01-15 15:38:52 +01:00
2020-01-15 15:59:12 +01:00
### Creating a branch
2020-01-15 15:38:52 +01:00
2020-01-15 15:59:12 +01:00
git branch feature <br/>
git commit -m "message 4" <br/>
git checkout feature <br/>
git commit -m "message 5" <br/>
git commit -m "message 6" <br/>
git commit -m "message 7" <br/>
git commit -m "message 8" <br/>
### Merging with master
git checkout master
git merge feature
undo
### Rebase with master
git checkout master
git rebase feature
git checkout feature
git merge