More details for git
This commit is contained in:
30
doc/git.md
30
doc/git.md
@@ -1,5 +1,35 @@
|
|||||||
# Git notes
|
# Git notes
|
||||||
|
|
||||||
|
## Rebase
|
||||||
|
|
||||||
|
### Move part file to another commit
|
||||||
|
* rebase interactive
|
||||||
|
* edit commit
|
||||||
|
* remove lines
|
||||||
|
* commit* create new commits for squash later
|
||||||
|
|
||||||
|
|
||||||
|
```bash
|
||||||
|
https://rietta.com/blog/git-patch-manual-split/
|
||||||
|
https://romanofskiat.wordpress.com/2015/05/12/git-moving-partial-changes-between-commits/
|
||||||
|
|
||||||
|
git commit --reuse-message=HEAD@{1}
|
||||||
|
````
|
||||||
|
|
||||||
|
Relative Refs
|
||||||
|
- https://www.atlassian.com/git/tutorials/refs-and-the-reflog
|
||||||
|
- https://stackoverflow.com/questions/2221658/whats-the-difference-between-head-and-head-in-git
|
||||||
|
|
||||||
|
|
||||||
|
```
|
||||||
|
HEAD~1
|
||||||
|
HEAD~
|
||||||
|
HEAD^1
|
||||||
|
HEAD^
|
||||||
|
HEAD@{1}
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
## Full ssh address for remote server
|
## Full ssh address for remote server
|
||||||
```
|
```
|
||||||
git remote set-url origin ssh://lachtan@byt13.fnet.cz:22002/home/lachtan/git/work/linux-workspace.git
|
git remote set-url origin ssh://lachtan@byt13.fnet.cz:22002/home/lachtan/git/work/linux-workspace.git
|
||||||
|
|||||||
Reference in New Issue
Block a user