diff options
author | Johannes Stoelp <johannes.stoelp@gmail.com> | 2024-01-26 21:30:56 +0100 |
---|---|---|
committer | Johannes Stoelp <johannes.stoelp@gmail.com> | 2024-01-26 21:30:56 +0100 |
commit | f7e15166980d71a258b60db93b49e5af57803dd8 (patch) | |
tree | cdb2ad5d1dbf9c60f5ef1400ec0666906282c576 | |
parent | f7fb4c7303a5776ddb421d182a92f679a8b0f868 (diff) | |
download | notes-f7e15166980d71a258b60db93b49e5af57803dd8.tar.gz notes-f7e15166980d71a258b60db93b49e5af57803dd8.zip |
git: add clean and fetch/pull note
-rw-r--r-- | src/tools/git.md | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/tools/git.md b/src/tools/git.md index a1f4614..33bf858 100644 --- a/src/tools/git.md +++ b/src/tools/git.md @@ -29,6 +29,13 @@ +-------------------+ ``` +## Clean +```markdown + git clean -X ......... remove only ignored files (-n for dry run) + git clean -f -d -x ... remove untracked & ignored files / folders + git clean -e <pat> ... exclude pattern from deletion +``` + ## Staging ```markdown git add -p [<file>] ............ partial staging (interactive) @@ -62,6 +69,18 @@ other remote) ``` +## Update local from remote +```markdown + git fetch --prune .................. update all remote references and + remove delete non-existing ones + (does not merge into local tracking branch) + git pull [--rebase] ................ fetch remote references and merge into + local tracking branch (fast-forward by default). + Optionally rebase local tracking branch + on-top of remote branch (in case local + branch has additional commits compared to remote branch). +``` + ## Tags ```markdown git tag -a <tname> -m "descr" ........ creates an annotated tag (full object |