常用git命令积累汇总

以下是最近用git cmd常用到的命令

项目目录:
cd Project_Dir

#初始化git
git init

#添加要提交的文件如README.md,'.'代表当前目录的所有文件
git add README.md
git add .

#查看文件修改状态

git status

#git提交代码 带上注释
git commit -m "update readme.md commit"

#git从服务的master下pull下来代码
git pull https://github.com/yourGitHubName/yourRepository master

#git代码推到master上
git push https://github.com/yourGitHubName/yourRepository master

#git上下代码

git clone https://github.com/rockZjy/KeywordScore.git

猜你喜欢

转载自zhao-rock.iteye.com/blog/2286184