text Git命令
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了text Git命令相关的知识,希望对你有一定的参考价值。
git clone https://repo_address.git
git add .
git add --all
git commit -m "Initial commit"
git push origin master
git pull origin master
git config user.name "Jake"
git init [new repo in dir you are currently in]
git --add file.txt [adds a file that you specify for commit]
git status
git show [info on last commit + diff]
git log [entire log]
git log -1 [specify how many commits back]
git log -1 --pretty=%B [JUST the commit info]
git reset HEAD newfile.txt [unstage a file]
git reset --hard HEAD [lost everything in the current change set]
git rm [careful, will remove (delete) file on next commit]
git rm --cached [remove file from commit but doesn't delete]
git tag -a MyTageName -m "This is my first tag"
git branch
git branch NewWork
git checkout NewWork
git checkout -b pasta [new creation at same time]
git merge NewWork
git diff branchname..branchname
git stash
git remote -v [show remote location]
git fetch vs git pull
git config --global push.default simple
git config --global -l
git mergetool
git config --global credential.helper
git --exec-path
Reset commits
git add --all
git fetch --all
git reset --hard origin/branchname
git branch -d localBranchName [deleting a local branch]
git push origin --delete branchName [deleting a remote branch]
以上是关于text Git命令的主要内容,如果未能解决你的问题,请参考以下文章
text Git命令
text Git ftp配置和命令
text Git命令
text Git命令
text git有用的命令
text git命令