我们大多数时候都使用IDE和其他软件来编写命令,但为了更好的工作,我们还需要随时准备一些可以随手使用的命令,以备不时之需。
以下是我在开发时候,通常使用的命令,今天,我将它分享与你,希望对你有所帮助。
git init
git clone ssh://git@github.com/[username]/[repository-name].git
git status
git add [file-name.txt]
git add -A
git commit -m "[commit message]"
git rm -r [file-name.txt]
git branch
git branch [branch name]
git branch -d [branch name]
git checkout -b [branch name]
git checkout -b [branch name] origin/[branch name]
13、重命名本地分支
git branch -m [old branch name] [new branch name]
git checkout [branch name]
git merge [branch name]
git merge [source branch] [target branch]
git stash
git stash clear
git push origin [branch name]
git push
git pull
git pull origin [branch name]
git remote add origin ssh://git@github.com/[username]/[repository-name].git
git log
git diff [source branch] [target branch]
求一键三连:点赞、转发、在看。