Commands Description git branch To list branches git branch -a To list all the branches git branch [branch name] To create a new branch git branch -d [branch name] To delete a branch git push origin –delete [branchName] To delete a remote branch git checkout -b [branch name] To cre...
These Git commands update your local repo: Git fetch downloads any new commits that others uploaded to the remote repo. The remote-tracking branches in local repo cache are updated—local branches remain unchanged. Git merge integrates commits from one or more source branches into a target ...
# 1. 将修改作为当前分支的草稿保存$git stash # 2. 查看草稿列表$git stash liststash@{0}: WIP onmaster:6fae349:memo: Writing docs.# 3.1 删除草稿$git stash drop stash@{0}# 3.2 读取草稿$git stash apply stash@{0} 暂存 git add命令用于将修改添加到暂存区。 暂存指定文件 gitaddxxx 暂存当前...
git config --global alias.[alias_name] [git_command]Copy Note:Git requires you to type out the entire command to perform actions. Setting shortcuts for commonly used commands can speed up and simplify development. For example, you can use the aliasstfor the status command by typing the com...
Entries in a.gitignoreorexcludefile have no effect on files that Git already tracks. Git tracks files that you previously committed. To permanently remove a file from the Git snapshot so that Git no longer tracks it, but without deleting it from the file system, run the followi...
The following examples will be executed in a simple repo. The repo is created with the commands below: $:>mkdirdiff_test_repo $:>cddiff_test_repo $:>touchdiff_test.txt $:>echo"this is a git diff test example"> diff_test.txt $:> git init . Initialized empty Git repositoryin/Users...
GIT CHEAT SHEET Git is the free and open source distributed version control system that's responsible for everything GitHub related that happens locally on your computer. This cheat sheet features the most important and commonly used Git commands for easy reference. INSTALLATION & GUIS With ...
» man pages section 1: User Commands » User Commands » git-grep Updated: July 2014man pages section 1: User Commands Document Information Using This Documentation Introduction User Commands 7z(1) 7za(1) 7zr(1) a2p(1) a2ps(1) aafire(1) aalib-config(1) accessx(1) acctcom(1)...
A List of Git Commands Git Setup Create a new Git repository from an existing directory: git init [directory] Clone a repository (local or remote via HTTP/SSH): git clone [repo / URL] Clone a repository into a specified folder on your local machine: git clone [repo / URL] [folder] ...
» man pages section 1: User Commands » User Commands » git-show-ref Updated: July 2014man pages section 1: User Commands Document Information Using This Documentation Introduction User Commands 7z(1) 7za(1) 7zr(1) a2p(1) a2ps(1) aafire(1) aalib-config(1) accessx(1) acctcom...