0

问题很简单,如何在不使用完整命令的情况下为我的活动分支拉更改,git pull origin <branch_name>此命令必须有快捷方式,有吗?

git checkout -b feature_x
git push origin feature_x
git pull origin feature_x  # is there shortcut, keeping in mind this is active branch

谢谢

更新

基于下面接受的答案,这是解释更多的输出

>git remote show origin
* remote origin
  Fetch URL: git@github.com:XXX/FooBar.git
  Push  URL: git@github.com:XXX/FooBar.git
  HEAD branch: master
  Remote branches:
    master       tracked
    feature_x    tracked
  Local branches configured for 'git pull':
    master       merges with remote master
    feature_x    merges with remote feature_x    
  Local refs configured for 'git push':
    master       pushes to master       (up to date)
    feature_x    pushes to feature_x    (up to date)
4

1 回答 1

2

git push --set-upstream origin feature_x将允许只是git pull一个简写git pull origin feature_x

于 2012-08-23T09:37:35.937 回答