git的常用命令

1. 远程拉取项目

git clone https://github.com/×××

git clone -b kaka/dev https://github.com/×××(获取指定远程分支)

2. 正常提交代码到远程流程

------git add .

------git commit -m "提交备注"

------git status(状态信息)

------git push 

3. 拉取远程分支并创建本地分支

git checkout -b kaka/dev(本地分支名)  https://github.com/×××

4. 查看分支

------git branch -r   查看所有远程

------git branch -a  查看远程和本地所有分支

------git branch      查看本地分支

5. git 还原到某次commit

------git log           查看提交记录

------git reset --hard commit ID

 

 

 

你可能感兴趣的:(git)