Change a Git remote HEAD to point to something besides master
How do I set a Git remote's HEAD reference to point to something besides "master"?
My project has a policy not to use a "master" branch (all branches are to have meaningful names). Furthermore, the canonical master repository is only accessible via ssh://, with no shell access (like GitHub or Unfuddle).
My problem is that the remote repository still has a HEAD reference to refs/heads/master, but I need it to point to a different branch. This is causing two problems:
When cloning the repo, there this,
warning: remote HEAD refers to nonexistent ref, unable to checkout.
That's confusing and inconvenient.
The web-based code browser depends on HEAD as a basis for browsing the tree. I need HEAD to point to a valid branch, then.
So, I've been learning a bit more about git submodules, and everywhere that I read tells me that I end up with a detached HEAD after I add my submodule. This makes sense as I want my superproject to k
I'm dealing with two repositories. A remote server running SVN and my local git repo. I've got my head/master branch to where I want it after several edits. Now I just want to push the latest copy of
In git it's quite convenient to identify a commit relative to the latest commit in the repo with HEAD~1. I have searched and cannot find an equivalent for this in mercurial. I find mercurials revision
In git, I've been making commits onto the master branch, when really I should have been working on a feature branch. I want to change this so that master is back to where it started, and what was on m
I am trying to quiet the git remote update command in my Ruby script. I used the --quiet flags of other Git commands like git checkout [branch_name]. For some reason Git doesn't have that flag when do
I am on master branch and I did 2 local commits(not pushed) on top of commit which is pushed to remote. I want to to get my local working master branch in sync with remote.So i ran the command git che
I have setup a new Git repository at cloufforge and have some unusual problems. When I do a git pull origin master From https://dndigital.git.cloudforge.com/project * branch master -> FETCH_HEAD Al
I'm working on a Git project and had a question about HEAD. In our remote Git repository, I see the file git_repo_home/HEAD and another file git_repo_home/refs/heads/HEAD The content of the former
Using git pull used to pull from the remote repository as expected - now, it's asking me to use git pull origin master. I don't quite understand the instructions it's giving me, saying I can add somet
while pulling into my git repository from our central server, this error occured: $ git pull origin master From http://aaa/repo * branch master -> FETCH_HEAD error: unable to resolve reference ORIG
I did this (on my production server): $ git branch * master $ git fetch staging $ git checkout staging/stage1 Now I want the master branch to point to HEAD which is a SHA-1 hash. I also want the mast
I am moving my team over from an old CVS repository to using git. I was hoping to add in a precommit hook to ensure before a commit is done locally (and pushed) each person has an up to date repo. For
GitRef.org - Basic: git rm will remove entries from the staging area. This is a bit different from git reset HEAD which unstages files. By unstage I mean it reverts the staging area to what was t
git push origin master Total 0 (delta 0), reused 0 (delta 0) error: unable to resolve reference refs/heads/master: Permission denied remote: error: failed to lock refs/heads/master To git@remote-repo
What revision control do you use that works best for windows besides Git and you see staying around for the next generation of programmers.
What command can I use to print out the commit id of HEAD? This is what I'm doing by hand: $ cat .git/HEAD ref: refs/heads/v3.3 $ cat .git/refs/heads/v3.3 6050732e725c68b83c35c873ff8808dff1c406e1 But
I'm trying to run git pull origin master on my production server, however it is failing with the following. From ssh://bitbucket.org/ala_arab/admnet * branch master -> FETCH_HEAD Auto-merging db/
I have a local repository which I cloned through git clone --mirror <ssh-url>. I then keep it up to date using git remote update --prune. At this point, HEAD points to refs/heads/master I then
Just when I thought I'd got the hang of the git checkout -b newbranch - commit/commit/commit - git checkout master - git merge newbranch - git rebase -i master - git push workflow in git, something bl
I have the HEAD and my origin/master synced, but my master is behind by two commits. Calling git branch -a reveals that I am detached from 16e6202(master). Can someone explain what this means? * e3aca
I created new remote git repository and already pushed something in there - first test push and then real code push from local. I want to start from scratch so I can creat few branches (master = ready
It think I did something really bad: $ git init $ git add -A $ echo some text > another-file $ git commit another-file -m message $ git reset HEAD --hard Result: all staged, but uncommitted, f
I have forgot to create local branch and was working with remote. After making some changes, i by mistake using Eclipse Git plugin commit this branch in nowhere(obliviously there wasn't local branch).
I have 2 git branches: master and experimental. Experimental became good, I want to make it the master. I figured I would rename to shuffle things around, but here is what I got: nutebook:Stuff nathan
I git clone a repository, then made some change in the local. Now I need to pull content from remote master branch, but 1) I want to keep my changes in local; 2) I don't want to push my changes to rem
I'm not entirely sure of the steps that caused this however I have ended up without my GIT master branch. I had a crack at fixing things using the instructions here: http://sitaramc.github.com/concep
I want to know change status of directory with percentage. So I run like following case 1 $ git diff --dirstat=files,10,cumulative HEAD^..HEAD usage: git diff [<options>] [<commit> [<co
I'm trying to set up replication between two MySQL servers. From the slave I log in as follows: mysql --host=10.32.8.187 --user=repl --password=******** My CHANGE MASTER statement: CHANGE MASTER TO
I have a devel branch and origin/master has been updated. I run git pull and I can see the remote changes. However, my local master is still where I left it when I previously did git checkout devel. I
This question already has an answer here: Can I make the gh-pages branch of my git repository a mirror of the Master branch? 1 answer Is it possible to setup a branch that will always contain w
I made some changes, committed them and pushed the branch to Gerrit (git push gerrit). Now my changes don't appear in Gerrit and I assume this is because I pushed the changes manually instead of using
I have GIT running on a private server using SSH. Every time I pull from the remote I am prompted for a password: AWS-Box:/home/git/site$ sudo git pull origin master git@remoteserver password: Howeve
With unlimited lifetimes for ‘develop’ and ‘master’, what’s the best workflow for merging and tagging a GitHub remote ‘origin/develop’ branch into the remote ‘origin/master’ without the remote ‘master
I have a master branch and a master new branch. The master new is a result of a mistake that was needed to be fixed quickly. I know it is a very bad practice to do that but thats were I am now.
I want to track a remote master branch from a new remote repository. Both do already exist. How do I go about this in git? I can't seem to get it right. I tried: git remote add otherRepo git://... gi
I already googled, and read many document. but Unfortunately I cannot understand them all My situation is. git branch -r origin/HEAD -> origin/master origin/master origin/team/myteam git branch -a
I have 3 local and 3 remote branches and want to be on the same branch on both. on local: git branch A * B master git branch -r origin/A origin/B origin/master on remote: git branch A B * master I a
Using msysgit on Windows, I can do this: git checkout head or git checkout HEAD Either works. I don't have a linux environment to test on, but I'm just curious: is HEAD case insensitive by design? I
I'm using Git, and am trying to push my changes: git push origin master It seems to start uploading, but then I get this error: remote : fatal: the empty string is not a valid path I don't underst
How do I see the difference between a local file (in Master) and the same file in the remote repository (origin) in git? When I do a git fetch origin and then do a git diff master origin/master. It sh
My git version is 1.8.0 mysysgit0. Remote repo on -linux server. Local repo - Windows 7. When I try to commit my local changes it says fatal error below: fatal ambiguous argument 'HEAD' both revision
Today I try to track a remote branch (specifically, Mapbox-ios-sdk's 23-callouts. So, what's the difference between the following three commands: git checkout remotes/origin/23-callouts git checkout -
This question already has an answer here: Why is “origin/HEAD” shown when running “git branch -r”? 7 answers >git branch -a * master remotes/origin/HEAD -> origin/master remotes/origin/ma
My git log shows: 557b5b6 (HEAD, origin/tmp_branch, origin/master, origin/HEAD, tmp_branch, master) Fri Jan 27 22:51:49 2012 +0800 control RUN_WEEKLY tmp_branch is a redundant head ref that I would
I saw in a tutorial that a person used git push origin master but the remote branch was named o/master. There was no remote named origin, just o. Was that a mistake he made or does origin have a speci
I'm trying to setup gitosis according to the instructions here. It works fine from my remote machine so the server seems to be setup fine but I'd also like to be able to do development on my gitosis s
Is there any difference in pushing the master branch of a local git repository to the master branch of a remote repository called origin with git push origin master or with git push origin?
I want to update HEAD programmatically without performing a checkout or rebase on a non-bare repo. I want the working tree and index to be unchanged after the operation. EDIT I need to update the symb
I am using TortoiseGit for Windows. I see two branches on remote/origin: HEAD 20 minutes ago Some commit message. master 20 minutes ago Some commit message. I am confused why HEAD shows up as a branc
Quite often, Git and Rails looks like magic... such as in the first chapter of Rails 3 Tutorial book, it talks about Git: git remote add origin email@example.com:peter/first_app.git git push origin maste