@REM 根据实际情况设置GIT路径及本地仓库地址 set path=%path%;"D:\Program Files\Git\cmd" set project_path=F:\git-demo set base_url=git@172.13.15.10:group/ @REM 克隆代码:注释 cd /d %project_path% git clone %base_url%/demo.git @REM 更新代码:注释 cd /d %project_path%\demo git fet
First machine: git init --bare gitrepo.git Second machine: git clone user@server:~/gitrepo.git cd gitrepo touch test git add test git commit -a # '-u' tells git to track the remote master branch with your local master branch git push -u origin master
进入项目目录后,执行 git pull 命令,没有将项目更新,并提示下图: 提示:there is no tracking information for the current branch. 意思是说本地分支master和远程分支master,并未关联.之前文章中曾经说过,在本地仓库和远程仓库连接后,执行一个: git push -u origin master 1 git push -u origin master 把本地库的内容推送到远程,用git push命令,实际上是把当前分支mas