使用命令将本地的分支推送到远端

之前一直在使用tortoisegit的图形化界面工具,都不熟悉命令了

当前处于master分支,尝试用了git push origin

warning:
push.default is unset; its implicit value is changing in Git 2.0 from ‘matching‘ to ‘simple‘.
To squelch this message and maintain the current behavior after the default changes, use:

git config --global push.default matching

To squelch this message and adopt the new behavior now, use:

git config --global push.default simple

When push.default is set to ‘matching‘, git will push local branches to the remote branches that already exist with the same name.

In Git 2.0, Git will default to the more conservative ‘simple‘ behavior,
which only pushes the current branch to the corresponding remote branch that ‘git pull‘ uses to update the current branch.

See ‘git help config‘ and search for ‘push.default‘ for further information.
(the ‘simple‘ mode was introduced in Git 1.7.11. Use the similar mode ‘current‘ instead of ‘simple‘ if you sometimes use older versions of Git)

$ git push origin Test:master

将本地的Test分支推送到远端的master分支

时间: 2024-08-30 01:52:16

使用命令将本地的分支推送到远端的相关文章

批处理脚本,git本地workspace一键推送到远端repo

1 @echo off 2 setlocal enabledelayedexpansion 3 git status||goto :eof 4 5 set "msg=quick push. %date% %time%" 6 if #%1==# (set /p "msg=commit message?"&pause&set "msg=!msg! %date% %time%") 7 8 if not #%1==# set "

git本地分支推送到远程分支

1.创建的创建和初始化 创建git仓库可以在远端创建一个仓库, 然后check到本地,在本地的文件里创建工程文件,然后提交 也可以将本地现有的工程和远端的空仓库关联 本地创建了一个工程 iOSDemo 运行没有错误,就可以提交到远端了. 一般情况下,远端仓库创建成功之后会有以下提示 #Command line instructions #Git global setup git config --global user.name "wangjiangwei336" git config

在本地新建一个分支后,推送到远端

当今的职业化教育是扼杀天才的最好武器!已经很难出现箱富兰克林,达芬奇那样的通才了! 推送本地分支到远程仓库: 注意: git push --set-upstream origin dev1,最后的dev1为你要推送的本地分支的名字,不是给远端分支重新起名! 然后,可以在remote端看到新分支.你在本地修改并add ,commit,push后,可以更新远端的这个dev1分支了. (思考: 在本地的当前分支下执行git push,不带任何参数,默认是push到与本地当前分支相关联的远端分支吧哈)

将本地的代码推送到公网的github账号去

将本地的代码推送到公网的github账号去 作者:尹正杰 版权声明:原创作品,谢绝转载!否则将追究法律责任. 最近工作上需要用到github账号,拜读了一位叫廖雪峰的大神的文档,把git的前世今生说的特别详细,大家有兴趣的口语去看看,及时你是小白你也能看明白,前提是你得静下心来看.如果你是个开发的话,知识想讲本地的代码推送到你的github账号上去,那么我这篇博客会手把手教你如果实现,好了,废话不多说,我们直接开始我们的表演吧. 一.在服务器上安装git 说白了,git是个linux程序,当然很

TortoiseGit学习系列之TortoiseGit基本操作将提交到本地的项目推送到在线仓库(图文详解)

前面博客 TortoiseGit学习系列之TortoiseGit基本操作修改提交项目(图文详解) TortoiseGit基本操作将提交到本地的项目推送到在线仓库 推送是提交的下一步操作. 在本地项目的空白处点击鼠标右键, 选择 TortoiseGit --> 推送... 或: Push.... 弹出推送(push)对话框: 一般保持默认,点击 "确定" 按钮. 然后弹出推送进度界面,可能要求你输入用户名: 确定OK,然后要求输入密码: 密码输入正确后,OK,显示推送成功界面:  

git 命令行(四)-推送分支到远程

在本地新建一个分支: git branch newBranch 切换到你的新分支: git checkout newBranch 创建并切换到新分支: git checkout -b newBranch 将新分支发布在github上: git push origin newBranch 在本地删除一个分支: git branch -d newBranch 在github远程端删除一个分支: git push origin :newBranch   (分支名前的冒号代表删除) 直接使用git pu

git本地仓库关联多个remote,怎么用本地一个分支向不同remote不同分支推送代码

我想这个问题,是大家关注的问题,这个问题,我非常关注. 背景:在公司开发项目,我们一般都要把项目推送到公司领导创建的一个远程仓库里边去,但是我们同时也有自己的小仓库,这样的话,如何方便的将我们的代码,给公司仓库推送一次,然后给自己的仓库推送一份呢? 1.在我们项目根目录打开git 终端 现在这个项目的远程库指向的是公司的 2.在github上创建一个我们自己的仓库 3.下面执行这行命令 git remote set-url origin --push --add [email protected

Git 命令总结 及 GItHub 项目推送

#今天码了一个小时左右总结了一下git的命令还有一些注意点以及如何推送自己的github仓库上. ps: 自己总结的难免出现理解或时语法上的错误[仅供参考] Git命令 #添加到暂存区 #将所有内容加到暂存区 $ git status  #查看工作区 $ git commit -m "注释"  #从暂存区存入版本区,注释内容随意填 $ git commit -a -m "注释" #从工作区存入暂存区再存入版本区 $ git remote add origin [em

github仓库的建立及本地仓库的推送

一.github仓库的建立 1.进入github网站(https://github.com/),并登陆账号 2.点击上图右下角的“+New repository”控件,进入以下界面: 3.输入上图中的相关信息后,点击Create repository控件后便创建了一个新的git repository. 二.本地仓库的建立 配置用户信息 git config --global user.name  "kwgqjj" git config --global user.email  [ema