git的使用

$ git pull

You are not currently on a branch, so I cannot use any

'branch..merge' in your configuration file.

Please specify which remote branch you want to use on the command

line and try again (e.g. 'git pull ').

See git-pull(1) for details.

解决方法:

一般来说

在目录下用git clone [email protected]:xxxxx/yyyyy.git

接着要查看下本地的当前分支嘛

git branch

你会看到你在master分支下

这个时候往往会用git checkout -b dev origin/dev这个命令

它意思是说.切换到dev分支上,接着跟远程的origin地址上的dev分支关联起来,这里要注意origin代表是一个路径,可以用git remote -v 查看

说来白了,origin/dev有点像是[email protected]:xxxxx/yyyyy.git/dev

接着在dev当前分支下进行操作,add,commit后,用git push origin dev,意思是推送当前的dev分支到远程origin地址的dev分支上

你可能感兴趣的:(git的使用)