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

51 lines
624 B
Markdown
Raw Normal View History

2020-01-15 15:38:52 +01:00
# Visualize git
2020-01-16 13:51:42 +01:00
https://johanneslerch.github.io/visualizing-git/
2020-01-15 15:38:52 +01:00
## commands
2020-01-15 16:12:32 +01:00
pres()
2020-01-15 15:59:12 +01:00
### Adding commits
2020-01-16 13:51:42 +01:00
git commit
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-16 13:51:42 +01:00
git branch feature
git commit
git checkout feature
git commit
git commit
git commit
git checkout master
git branch feature2
git commit
git checkout feature2
git commit
git commit
git commit
git commit
git checkout master
2020-01-15 15:59:12 +01:00
### Merging with master
2020-01-16 13:51:42 +01:00
git checkout master
git merge feature
git merge feature2
### Delete unused branches
git delete feature
git delete feature2
2020-01-15 15:59:12 +01:00
undo
### Rebase with master
2020-01-16 13:51:42 +01:00
git checkout master
git rebase feature
git checkout feature
git merge master