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

31 lines
581 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
2020-01-15 16:00:13 +01:00
git checkout master <br/>
git merge feature <br/>
2020-01-15 15:59:12 +01:00
undo
### Rebase with master
2020-01-15 16:00:13 +01:00
git checkout master <br/>
git rebase feature <br/>
git checkout feature <br/>
git merge <br/>