This repository has been archived on 2023-11-08. You can view files and clone it, but cannot push or open issues or pull requests.
How-To-Git-Started/resources/visualize-git.md

51 lines
630 B
Markdown
Raw Permalink 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
2020-01-16 13:53:19 +01:00
git branch -d feature
git branch -d 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