Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6600107
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T18:34:44+00:00 2026-05-25T18:34:44+00:00

I am using the Integration-Manager workflow with Git, while using gitolite for permission management.

  • 0

I am using the “Integration-Manager” workflow with Git, while using gitolite for permission management. Gitolite has this neat option for easily managing personal user branches in:

refs/personal/USERNAME/USERBRANCHNAME

In our case, these are the only branches to which the developers have write access. This means they are routinely pulling from the “blessed” repository, which is the “master” branch on the “origin” remote, like so:

$ git pull origin master

However, they need to routinely push their work back up to their personal branches, like so:

$ git push origin master:refs/personal/mysuername/mybranchname

Typing those long branch names gets old, really fast, especially for the integrator, who is having to pull routinely from various, long branch names. Most people want to type something simpler, like:

$ git push origin master:mybranchname

So, my question is, “How do I make this easier with shorter names and reduced typos?” Is there some way to create an alias or shortcut for the user’s remote branch? Our integrator would like to be able to create aliases for each of the developers to simplify her commands also.

Also, is it possible to configure git to always pull from one branch and push to a different branch without having to specify the remote and branch names in both cases? This would help our developers, although it would not help our integrator. … I’m familiar with configuring a single default to push and pull from the same remote and branch, but that does not work in this case, since the push and pull branches are different.

Thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T18:34:45+00:00Added an answer on May 25, 2026 at 6:34 pm

    Thanks to all for the input and suggestions. Here’s how I got my developers and integrators to use bare git push and git pull:

    For The Developer

    In the simplest integration-manager workflow, as described above, the developer has cloned (git clone) and is therefore automatically tracking the remote master branch in her local master branch, so all she needs is:

    git pull
    

    To update her local master branch. If she is working in some other branch, then she can update the upstream branch that is is tracking, as Adam suggested:

    git branch --set-upstream MYOLDBRANCH origin/master
    # or, use longer, more explicit syntax, like:
    git branch --set-upstream MYOLDBRANCH refs/remotes/origin/master
    

    The tracked branch (origin/master, in this case) will be pulled by default.

    Since the default push target is a different branch and not the same name, we cannot take advantage of the push.default being: tracking, current, or matching. Instead, our developer must set the default source:destination refspec for all pushes to a given remote in her .git/config file, like so:

    [remote "origin"]
            fetch = +refs/heads/*:refs/remotes/origin/*
            url = GITREPOHOSTNAME:REPONAME
            push = master:refs/personal/MYDEVNAME/MYBRANCHNAME
    

    She could also create an alias, like so:

    git config alias.pushToMyBr 'push origin master:refs/personal/MYDEVNAME/MYBRANCHNAME
    

    Aliases are very powerful and offer the ultimate flexibility in avoiding keystrokes. 🙂 The above case can be executed with a simple:

    git pushToMyBr
    

    For The Integrator

    In this simple case, the integrator usually pushes to one place, origin/master. If the push.default is set to matching, tracking, or current, then a bare push will work, like so:

    git config push.default current
    git checkout master
    git push
    

    The frequent pull from various personal developer branches is the more difficult case. The integrator can use aliases to simplify the task, like so:

    git config alias.pullFromXY 'pull origin refs/personal/DEVNAMEX/BRANCHNAMEY:master
    # or, pull to a specific topic branch
    git config alias.pullFromABtoC 'pull origin refs/personal/DEVNAMEA/BRANCHNAMEB:branchC'
    

    The integrator can also create branches to track the developer’s personal remote branches, like so:

    git checkout -b test_devXbranchY origin/personal/DEVNAMEX/BRANCHNAMEY
    # or, use a more specific syntax:
    git checkout -b test_devXbranchY refs/remotes/origin/personal/DEVNAMEX/BRANCHNAMEY
    

    For this to work, the integrator must add personal branches to her fetch list. This can be accomplished by directly editing her .git/config, like so: (I don’t know how to do this with a git-config or any other git command.)

    [remote "origin"]
            fetch = +refs/heads/*:refs/remotes/origin/*
            url = MYGITHOSTNAME:MYREPONAME
            fetch = +refs/personal/*:refs/remotes/origin/personal/*
            # Fetch a specific developer's branches:
            fetch = +refs/personal/devX/*:refs/remotes/origin/personal/devX/*
    

    Thanks to all for the help! Hope this helps someone else who uses gitolite and personal branches outside of head-space.

    Thanks!

    Trevor

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Gaffer on Games has a great article about using RK4 integration for better game
I know that using continuous integration improves the quality of my code base, and
We are using continuous integration as part of our build automation. For every check
I read an article about using CLR integration in sqlserver and was wondering what
I am working on some Plesk integration using the XML API and I am
i'm trying to get multi tenancy working in my app - using nhibernate integration
I'm trying to set up integration tests using the AbstractTransactionalJUnit4SpringContextTests base class. My goal
I am trying to get SpecUnit to run in a continuous integration build using
Using the Qt Visual studio integration, adding a new Qt class adds two separate
In using our TeamCity Continuous Integration server we have uncovered some issues that we

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.