https://github.com/schultyy/git-cheatsheet
My most used git commands
https://github.com/schultyy/git-cheatsheet
Last synced: 11 months ago
JSON representation
My most used git commands
- Host: GitHub
- URL: https://github.com/schultyy/git-cheatsheet
- Owner: schultyy
- Created: 2013-08-23T14:03:50.000Z (almost 13 years ago)
- Default Branch: master
- Last Pushed: 2013-08-26T05:52:56.000Z (almost 13 years ago)
- Last Synced: 2025-07-20T09:59:14.585Z (11 months ago)
- Homepage:
- Size: 44.9 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# git-cheatsheet
## git & svn
### Clone svn repository
git svn clone https://path/to/your/repository --stdlayout
`stdlayout` specifies, that `trunk`, `tags` and `branches` are being cloned.
**Note that this operation takes some time (hours)**
### Get new branches from svn
git svn fetch
### Get latest changes from svn
git svn rebase
### Commit to svn
git svn dcommit
## git
### Restore to a previous point
git reflog
git reset --hard
### Create patch
git format-patch master --stdout > my-patch.patch
### Change commit message after commit
git commit --amend -m "new message"
### Stash specific files
git add
git stash