srdusr
aboutsummaryrefslogtreecommitdiffstats
path: root/tools/git.md
diff options
context:
space:
mode:
authorsrdusr <[email protected]>2023-09-18 22:24:27 +0200
committersrdusr <[email protected]>2023-09-18 22:24:27 +0200
commit9420b38eb26ef4f31fe63a84169244fde1427031 (patch)
treed0258969d13f331db96713fb2ce33f0cbd3833f5 /tools/git.md
parent2739e257e183bbcbc09f228d88d5eab46eb1cd39 (diff)
downloadnotes-9420b38eb26ef4f31fe63a84169244fde1427031.tar.gz
notes-9420b38eb26ef4f31fe63a84169244fde1427031.zip
Info on fetch
Diffstat (limited to 'tools/git.md')
-rw-r--r--tools/git.md10
1 files changed, 10 insertions, 0 deletions
diff --git a/tools/git.md b/tools/git.md
index ede998f..eb3f59d 100644
--- a/tools/git.md
+++ b/tools/git.md
@@ -171,6 +171,16 @@ $ git remote add origin https://github.com/srdusr/grimoire.git
$ git push -u origin <branch>
```
+Fetch the most recent changes/commits from the remote branch/repository
+> NOTE: make sure to checkout to the desired branch first, example: `git checkout main`
+```
+$ git fetch origin
+```
+or
+```
+$ git fetch origin main:refs/remotes/origin/main
+```
+
Reset the local main branch to remote repository aka...
Delete the most recent commit, destroying the work you've done: