Note that there are some explanatory texts on larger screens.

plurals
  1. POdealing with long personal branch names in git and gitolite
    primarykey
    data
    text
    <p>I am using the <a href="http://progit.org/book/ch5-1.html" rel="nofollow noreferrer">"Integration-Manager" workflow</a> with Git, while using gitolite for permission management. Gitolite has this neat option for easily managing <a href="http://sitaramc.github.com/gitolite/doc/3-faq-tips-etc.html#_personal_branches" rel="nofollow noreferrer">personal user branches</a> in:</p> <pre><code>refs/personal/USERNAME/USERBRANCHNAME </code></pre> <p>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:</p> <pre><code>$ git pull origin master </code></pre> <p>However, they need to routinely push their work back up to their personal branches, like so:</p> <pre><code>$ git push origin master:refs/personal/mysuername/mybranchname </code></pre> <p>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:</p> <pre><code>$ git push origin master:mybranchname </code></pre> <p>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.</p> <p>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 <a href="https://stackoverflow.com/questions/658885/how-do-you-get-git-to-always-pull-from-a-specific-branch">configuring a single default to push and pull from the same remote and branch</a>, but that does not work in this case, since the push and pull branches are different.</p> <p>Thanks!</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload