Git 基本应用

git
1 生成ssh key
ssh-keygen -t rsa -C  "[email protected]"
2 配置email 和user
git config --list
$ git config --global user.name "John Doe"$ git config --global user.email "[email protected]"
3 在后台配置ssh key
cat ~/.ssh/id_rsa.pub 查看ssh key
4 下载clone工程
git clone [email protected]:cheng-junfeng/postman.git
5 基本应用
git checkout stable
git cherry-up 1554424454
git add a.txt
6 提交
git commit -a
git push origin master
7 回退
git reset --hard fad0988fadff
8 默认提交日志
gedit ~/.ssh/config
gedit /root/.git_commit_message
~/.gitconfig

猜你喜欢

转载自blog.csdn.net/qq_42022061/article/details/80762649