Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/git/24.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Git:使用通配符推送多个分支_Git - Fatal编程技术网

Git:使用通配符推送多个分支

Git:使用通配符推送多个分支,git,Git,以下是我的分支机构列表: $ git br BR_4_1_4 * BR_4_2_0 BR_4_2_0_phase2 feature/subchecks master wip/central-build-dir wip/cmake wip/gcc-pedantic wip/noncopyable-cserializable 我想推送所有以wip/开头的分支。所以我试了一下: $ git push -u origin wip/* Everything up-to-d

以下是我的分支机构列表:

$ git br
  BR_4_1_4
* BR_4_2_0
  BR_4_2_0_phase2
  feature/subchecks
  master
  wip/central-build-dir
  wip/cmake
  wip/gcc-pedantic
  wip/noncopyable-cserializable
我想推送所有以
wip/
开头的分支。所以我试了一下:

$ git push -u origin wip/*
Everything up-to-date
但上面说一切都是最新的?这不可能,因为我知道远程服务器上不存在这些分支。这样行吗?如果没有,正确的方法是什么?

试试看

git push -u origin refs/heads/wip/*

不知道如何推送本地引用+1。这与指定
wip/*
有何不同?默认情况下,Git不应该在“refs/heads”中搜索吗?我不必为没有通配符的正常分支键入完整路径。