1.git init
2.git commit -m “first”
3.git remote add origin gitee仓库地址
4.git clone gitee中的http地址(将仓库的代码下拉下来)
5.git branch dev (创建新的分支)
6.git checkout -b dev (创建新分支并切换到分支上)
7.git checkout dev (切换到dev分支上)
8.git branch -a #(查看所有分支情况)
9.git add .
10.git commit -m ‘first’
11. git push
遇到的问题
fatal: The current branch dev_zzb_worldMap has no upstream branch.
To push the current branch and set the remote as upstream, use
git push --set-upstream origin dev_zzb_worldMap
解决:使用下面它提供的语句
还报错
! [rejected] dev_zzb_worldMap -> dev_zzb_worldMap (fetch first)
error: failed to push some refs to ‘https://gitee.com/hdu_practice/smjk-map’
hint: Updates were rejected because the remote contains work that you do
hint: not have locally. This is usually caused by another repository pushing
hint: to the same ref. You may want to first integrate the