Creating a remote inside a directory of remotes

I am working on a project with multiple contributors who work on adding new features. When I git branch -a, it shows something like this:

remotes/origin/usr/username1/featureA
remotes/origin/usr/username2/featureB
remotes/origin/usr/username2/featureC
remotes/origin/usr/username2/featureD
remotes/origin/usr/username3/featureE

Local changes are pushed to these remotes before they are reviewed and merged with the master release branch. How can I create a remote that is also in this format, with my username and my feature name? Also, is this a path with directories for each user or is it just a string containing a slash?

  • git clone doesn't import all remote branches
  • Git rebase and git merge
  • Remove incorrect merges from repository
  • Modify previous commit without modifying working directory
  • Show logs for commits that are in a branch
  • Update an outdated branch against master in a Git repo
  • Git marging to branch and back to master
  • How can I, in one command, create or update a remote?
  • One Solution collect form web for “Creating a remote inside a directory of remotes”

    How can I create a remote that is also in this format, with my username and my feature name?

    You don’t: Other would add your repo as a remote (an upstream repo), and fetch your branch, which will be listed for them as their branches is listed for you.
    That is: if you create a branch with ‘/’ in it: it is called hierarchical branch names

    git checkout -b usr/myusername/featureX
    

    Jakub Narębski does mention though:
    “One caveat is that you can’t have both branch ‘foo‘ and branch ‘foo/bar‘ in repository.”

    is this a path with directories for each user or is it just a string containing a slash?

    The latter, it defines a branch name with namespaces.

    This is often see in gitolite-managed git repositories, with a feature like “personal branches“.

    Git Baby is a git and github fan, let's start git clone.