快速设置— 如果你知道该怎么操作,直接使用下面的地址
Git 全局设置:
git config --global user.name "herolf4c"
git config --global user.email "450108416@163.com"</pre>
创建 git 仓库:
mkdir tmp
cd tmp
git init
touch README.md
git add README.md
git commit -m "first commit"
git remote add origin https://gitee.com/herolf4c/tmp.git
git push -u origin master</pre>
已有仓库?
cd existing_git_repo
git remote add origin https://gitee.com/herolf4c/tmp.git</pre>
git init
git config --global user.email "you@example.com"
git config --global user.name "Your Name"
ssh-keygen -t rsa -C "450108416@163.com"
cat id_rsa.pub
git add .
git commit -m "first commit" //添加文件描述信息
git remote add origin git@github.com:herolf/asm_function-for-C.git
git pull origin master
git push -u origin master
正确步骤:
git init //初始化仓库
git add .(文件name) //添加文件到本地仓库
git commit -m "first commit" //添加文件描述信息
git remote add origin + 远程仓库地址 //链接远程仓库,创建主分支
git pull origin master // 把本地仓库的变化连接到远程仓库主分支
git push -u origin master //把本地仓库的文件推送到远程仓库
快速设置— 如果你知道该怎么操作,直接使用下面的地址
HTTPS
SSH
<input class="one_click_select" id="project_clone" name="project_clone" readonly="readonly" type="text" value="git@gitee.com:herolf4c/jiazheng.git" style="box-sizing: inherit; color: rgb(157, 157, 157); font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; font-size: 13px; line-height: 1.2142em; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Liberation Sans", "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", "Wenquanyi Micro Hei", "WenQuanYi Zen Hei", "ST Heiti", SimHei, SimSun, "WenQuanYi Zen Hei Sharp", sans-serif; margin: 0em; display: inline-block; padding-top: 0.67861em; padding-right: 2.82142em !important; padding-bottom: 0.67861em; padding-left: 1em; border: 1px solid rgb(220, 227, 232); border-radius: 2px; -webkit-appearance: none; width: 320px; outline: none; -webkit-tap-highlight-color: rgba(255, 255, 255, 0); text-align: left; background-image: initial; background-position: initial; background-size: initial; background-repeat: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: rgb(245, 245, 245) !important; transition: background-color 0.2s ease 0s, box-shadow 0.2s ease 0s, border-color 0.2s ease 0s, -webkit-box-shadow 0.2s ease 0s; box-shadow: none; cursor: text;">
我们强烈建议所有的git仓库都有一个README
, LICENSE
, .gitignore
文件
Git入门?查看 帮助 , Visual Studio / TortoiseGit / Eclipse / Xcode 下如何连接本站, 如何导入仓库
简易的命令行入门教程:
Git 全局设置:
git config --global user.name "herolf4c"
git config --global user.email "450108416@163.com"</pre>
创建 git 仓库:
mkdir jiazheng
cd jiazheng
git init
touch README.md
git add README.md
git commit -m "first commit"
git remote add origin git@gitee.com:herolf4c/jiazheng.git
git push -u origin master</pre>
已有仓库?
cd existing_git_repo
git remote add origin git@gitee.com:herolf4c/useful_code.git
git push -u origin master</pre>