Aliyun Codeup Git设置
- Codeup端创建repo,记住选择git源,不是https,记下A
- Windows 客户端 选择git bash,生成key 然后去codeup-个人设置-ssh公钥-复制黏贴
- Win git bash
执行git clone A即可
相关命令
//命令将更改的文件添加到 Git 的暂存区(staging area)中
git add .
//将暂存区中的更改提交到 Git 仓库中,并生成一个新的版本号(commit hash)
git commit
//查看代码的历史提交记录
git log
//代码推送到远程仓库
git push
//从远程仓库中获取代码
//git pull命令用于从远程仓库获取最新的代码更新。它主要用于同步本地仓库与远程仓库之间的差异。# 实际上,git pull相当于git fetch加git merge,即先获取远程仓库的最新版本,然后再与本地分支合并
git pull
git clone git@codeup.aliyun.com:..../.....git
cd shareparking
touch README.md
git add README.md
git commit -m "add README"
git push -u origin master
cd existing_folder
git init
git remote add origin git@codeup.aliyun.com:..../.....git
git add .
git commit
git push -u origin master
//撤销某个提交
git revert
//合并不同分支的代码
git merge
评论已关闭