github common commands

Global configuration

git config --global user.name "lewiscutey"
git config --global user.email "[email protected]"
git config --global push.default simple

clone an existing repository for development

git clone https://github.com/lewiscutey/JD.git
git --help
git status
git add *
git status
git commit -m 'test cli'
git push

Manage branches

git branch gh-pages
git checkout gh-pages
git merge master
git push --set-upstream origin gh-pages

Common commands

git branch      // 查看本地分支
git branch -a // 查看远程分支
git checkout . // 撤销本地所有更改
git branch -d <branch_name> // 删除其他分支
git branch -D <branch_name> // 删除正在开发的分支

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324665380&siteId=291194637