aboutsummaryrefslogtreecommitdiff
path: root/git
diff options
context:
space:
mode:
authorMateja <mail@matejamaric.com>2021-04-03 00:37:03 +0200
committerMateja <mail@matejamaric.com>2021-04-03 00:37:03 +0200
commita945feb02f6d64df2219ea1044251a7fe2ea98fc (patch)
treefe0242495eb35317fd5358e403a047657dfa04b5 /git
downloadmisc-a945feb02f6d64df2219ea1044251a7fe2ea98fc.tar.gz
misc-a945feb02f6d64df2219ea1044251a7fe2ea98fc.zip
Initial commit.
Diffstat (limited to 'git')
-rw-r--r--git33
1 files changed, 33 insertions, 0 deletions
diff --git a/git b/git
new file mode 100644
index 0000000..16b8f4f
--- /dev/null
+++ b/git
@@ -0,0 +1,33 @@
+git init
+git add .
+git commit -m 'Initial commit'
+git remote add origin link-to-repo
+git push origin master
+git branch --set-upstream-to=origin/master master
+
+git branch new-branch
+git switch new-branch
+git switch master
+git merge new-branch
+
+git pull -> git fetch && git merge origin/master
+
+git fetch --dry-run?
+git remote show origin
+git remote update ~= git fetch --all
+git status -uno?
+
+git fetch
+git diff master origin/master
+
+git branch -a #list branches
+git branch -d branch-to-delete
+
+git log
+git show <commit-id>
+
+git checkout old-commit
+git checkout master
+
+# Pushing to non-bare repo (apply to repo that need to recive update)
+git config --local receive.denyCurrentBranch updateInstead