From fa9d01dbe308c838422cfa1a6872983b32662e62 Mon Sep 17 00:00:00 2001 From: Sake Blok Date: Wed, 2 Sep 2020 10:08:39 +0200 Subject: [PATCH] Extracted all the Quick references --- quick-reference.txt | 83 ++++++++++++++++++++++++++++++++++++++++++ quick-references.xlsx | Bin 0 -> 12743 bytes 2 files changed, 83 insertions(+) create mode 100644 quick-reference.txt create mode 100644 quick-references.xlsx diff --git a/quick-reference.txt b/quick-reference.txt new file mode 100644 index 0000000..091eb69 --- /dev/null +++ b/quick-reference.txt @@ -0,0 +1,83 @@ +The Basics +git init#Create a Git repository in the current folder. +git status#View the status of each file in a repository. +git add #Stage a file for the next commit. +git commit#Commit the staged files with a descriptive message. +git log#View a repository’s commit history. +git config --global user.name ""#Define the author name to be used in all repositories. +git config --global user.email #Define the author email to be used in all repositories. + +Undoing Changes +git checkout #View a previous commit. +git tag -a -m ""#Create an annotated tag pointing to the most recent commit. +git revert #Undo the specified commit by applying a new commit. +git reset --hard#Reset tracked files to match the most recent commit. +git clean -f#Remove untracked files. +git reset --hard / git clean -f#Permanently undo uncommitted changes. + +Branches I +git branch#List all branches. +git branch #Create a new branch using the current working directory as its base. +git checkout #Make the working directory and the HEAD match the specified branch. +git merge #Merge a branch into the checked-out branch. + +Branches II +git commit -a -m ""#Stage all tracked files and commit the snapshot using the specified message. +git branch -D #Force the removal of an unmerged branch (be careful: it will be lost forever). + +Rebasing +git rebase #Move the current branch’s commits to the tip of , which can be either a branch name or a commit ID. +git rebase -i #Perform an interactive rebase and select actions for each commit. +git commit --amend#Add staged changes to the most recent commit instead of creating a new one. +git rebase --continue#Continue a rebase after amending a commit. +git rebase --abort#Abandon the current interactive rebase and return the repository to its former state. +git merge --no-ff #Force a merge commit even if Git could do a fast-forward merge. + +Rewriting History +git reflog#Display the local, chronological history of a repository. +git reset --mixed HEAD~#Move the HEAD backward commits, but don’t change the working directory. +git reset --hard HEAD~#Move the HEAD backward commits, and change the working directory to match. +git log ..#Display the commits reachable from but not from . These parameters can be either commit ID’s or branch names. +git log --stat#Include extra information about altered files in the log output. + +Remotes +git clone #Create a copy of a remote Git repository. +git remote#List remote repositories. +git remote add #Add a remote repository. +git fetch #Download remote branch information, but do not merge anything. +git merge /#Merge a remote branch into the checked-out branch. +git branch -r#List remote branches. +git push #Push a local branch to another repository. +git push #Push a tag to another repository. + +Centralized/Distributed Workflows +git init --bare #Create a Git repository, but omit the working directory. +git remote rm #Remove the specified remote from your bookmarked connections. +git remote rm #Remove the specified remote from your bookmarked connections. + +Patch Workflows +git format-patch #Create a patch for each commit contained in the current branch but not in . You can also specify a commit ID instead of . +git am < #Apply a patch to the current branch. + +Tips & Tricks +git archive --format=zip --output=#Export a single snapshot to a ZIP archive called . +git bundle create #Export an entire branch, complete with history, to the specified file. +git clone repo.bundle -b #Re-create a project from a bundled repository and checkout . +git stash#Temporarily stash changes to create a clean working directory. +git stash apply#Re-apply stashed changes to the working directory. +git diff ..#View the difference between two commits. +git diff#View the difference between the working directory and the staging area. +git diff --cached#View the difference between the staging area and the most recent commit. +git reset HEAD #Unstage a file, but don’t alter the working directory or move the current branch. +git checkout #Revert an individual file to match the specified commit without switching branches. +git config --global alias. #Create a shortcut for a command and store it in the global configuration file. + +Plumbing +git cat-file #Display the specified object, where is one of commit, tree, blob, or tag. +git cat-file -t #Output the type of the specified object. +git ls-tree #Display a pretty version of the specified tree object. +git gc#Perform a garbage collection on the object database. +git update-index [--add] #Stage the specified file, using the optional --add flag to denote a new untracked file. +git write-tree#Generate a tree from the index and store it in the object database. Returns the ID of the new tree object. +git commit-tree -p #Create a new commit object from the given tree object and parent commit. Returns the ID of the new commit object. + diff --git a/quick-references.xlsx b/quick-references.xlsx new file mode 100644 index 0000000000000000000000000000000000000000..7e211dfb43c4a4463c74e1aef4f546ce8686fea2 GIT binary patch literal 12743 zcmeIY1$P}e)-`+`Gc&|YH)dvLW=hO#$ILM^Gcz+YGcz-@)=KBTD z=&n^-wMzS3mFjFA>1fMKfr6m{AOKJR0DuUff0kjQ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