git命令学习之clone指定分⽀代码git命令学习之clone指定分⽀代码
今天要拉取⼀个项⽬,但是是⼀个指定分⽀,本来我以为直接git clone就⾏,但是发现好像不能,报错:Cloning into 'lecture'...
fatal: unable to update url base from redirection:
asked for: XXXXXXX
redirect: XXXXXX
后来在⽹上查了⼀下,要clone指定分⽀是 git clone -b 指定分⽀名称  项⽬ssh地址
这样就可以拉取指定分⽀代码了
git branch ⽤于看当前的分⽀,⼀定要进⼊当前的⼯程⽬录下查看
-
--------------------------------------------
Command line instructions
You can also upload existing files from your computer using the instructions below.
Git global setup
git config --global user.name "赵**"
Create a new repository
***********************:ios/tra***ask_ios.git
cd trad***dask_ios
touch README.md
git add README.md
git commit -m "add README"
git push -u origin master
Push an existing folder
cd existing_foldergit init
git remote add origingit@gitlab.***:ios/tra***ask_ios.git
git add .git commit -m "Initial commit"git push -u origin master
Push an existing Git repository
cd existing_repo
git remote rename origin old-origin
*********************************:ios/tr****sk_ios.git
git push -u origin --all
git push -u origin --tags
clone

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。