# Git commands --- - git clone - git status - git add - u - a - p - git rm - git restore - p - git commit - amend - git reset - soft - hard - git diff - git show - git log - git checkout - b - git checkout branch -- file (to change the state of a file from the current branch to the given branch) - git branch - git remote - v - add remote-name url - git push/pull/fetch - f - all - remote branch - delete remote branch - git tag + how to delete a tag - git merge - ours - theirs - git rebase - i - HEAD~n -i (interactive rebase/edit last n commits) - git grep - l - git bisect - start - bad - good - git reflog - git worktree - add - list - prune - git cherry-pick - The `-x` option is recommended when backporting commits from a public branch into another public branch, it appends a line saying: "cherry picked from commit ...", helps eventual debbuging. - git format-patch # Teaching resources - https://git-school.github.io/visualizing-git/
{"metaMigratedAt":"2023-06-17T15:23:25.752Z","metaMigratedFrom":"Content","title":"Git commands","breaks":true,"description":"git clone","contributors":"[{\"id\":\"a71fa677-8ef3-4372-b322-aa59f8592630\",\"add\":503,\"del\":9},{\"id\":\"edea3ca7-bc2b-4852-963b-a217d8ecd3a4\",\"add\":702,\"del\":139}]"}
    182 views