More details for git

This commit is contained in:
Martin Blazik
2022-05-02 08:23:46 +02:00
parent 1d1fee34bb
commit f796acf14e

View File

@@ -1,5 +1,35 @@
# 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
```
git remote set-url origin ssh://lachtan@byt13.fnet.cz:22002/home/lachtan/git/work/linux-workspace.git