git指令

sudo nano /etc/hosts

ssh-keygen -t rsa -b 4096 -C “[email protected]” 获取公钥私钥(默认按3个回车,或输入文件夹地址加一个名称)

git config --global user.name “Shang Gang”

git config --global user.email "[email protected]"

git clone [email protected]:demo/git-tutorial.git 克隆代码到本地

git checkout -b development master 创建一个development分支在master下

git checkout development 切换到development分支

git checkout -b feature-shanggang development 创建一个新的分支在development下

git status

git add .

git commit -m "add a fil3e"

git push origin improveHeWeiBiConsum  上传代码到远程分支

git branch 获取本地分支

git branch -r 获取远程分支

git branch -a 获取远程分支

git branch -d ll 删除分支

git branch -D ll 强制删除分支

git fetch -p

git fetch origin

git push origin --delete heweibiConsume

git checkout origin/addNewPlan -b addNewPlan 本地分支与远程关联

你可能感兴趣的:(git指令)