How do I remove the active branch in a bare `git` repository?
I'm experimenting with some
githooks, so I have setup a local bare repository with a symlink from
hooks to the hooks stored elsewhere.
I have pushed the
master branch to the
git repo and, of course, the hook failed. :)
I want to reset the
git repo to nothing, without deleting it and having to recreate the symlink etc.
How do I delete the master branch, seeing as it is the only branch in the repository?
$ git branch -d master
error: Cannot delete the branch 'master' which you are currently on.
I'm very new to git coming from subversion. Our techops team created an empty repo for my new project. I've been working on the project for weeks and have all the code in a folder off my C drive. I've
If I create a Git repository and publish it publicly (e.g. on GitHub etc.), and I get a request from a contributor to the repository to remove or obscure their name for whatever reason, is there a way
I am attempting to create a svn branch using git-svn. The repository was created with --stdlayout. Unfortunately it generates an error stating the Source and dest appear not to be in the same reposit
I am using GIT on top of one centralized SVN repository. The SVN repository only contains trunk, no tags and branches. What I did before is using git svn to clone the remote repository to my local git
There is a repository /abc on GitHub that I forked. So my fork is at me/abc. Jim also forked /abc, with their repo at Jim/abc. Jim added a branch called 2.0. This branch doesn't exist on /abc. I have
I have a local git repository which tracks a remote SVN repository via git svn. I have made and committed some changes in the local git repository, but now I'd like to create a branch that reflects SV
I am using git version 220.127.116.11 on debian Wheezy. I am trying to create a new repository (according to the 'manual of git-scm.com) However everytime I get this fatal error: fatal: repository 'poekoe'
I worked on some code on a local branch and then I pushed it to a remote test repository with this command: git push origin fix_vouchers:fix_vouchers I'd like to change the active brank on that remot
Currently, each user has to configure Git-flow first after having cloned the repository. How to store this branch naming configuration in a committable file (to be stored in the repository), so after
I'm trying to synchronize periodically a git bare repository, my local branches are created using the --track option. here is my config (without unnecessary things): [core] bare = true [remote orig
I'd like to add one file to git repository as if it was there from the start. I only found explanations how to remove a file from entire history, not how to add one. I tried git filter-branch --tree-f
A central git repository we use has two branches that diverged a long time ago. Someone accidentally merged the old branch into the newer one, causing some conflicts. Now I have a merge commit sitting
I've seen usage of the following git clone syntax git clone --bare /path/to/repo /path/to/bare/repo.git However, this doesn't seem to work when the destination is on a remote host. I've tried several
I have cloned a git repository and I would like to switch to a particular branch from the following list (e.g. branch1, branch2, branch3) Should I have to say git fetch origin branch2? How do I know t
I've setup my environment so I can push to a remote bare repository, I used these commands to setup the remote repository: $ mkdir ~/website.git && cd ~/website.git $ git init --bare And $ ca
I have a running git folder where I can push my commits to the remote repository, but I didn't configure it myself. How can I find out how it is configured? Where does it push to, wiht which username
I am currently creating topic branches: git checkout -b topic_branch ...do work... git checkout master git merge topic_branch but currently when I do this, I lose history of my 'topic_branch' and all
I'm cloning a Git repository by copying the .git directory. If I run git checkout in that directory it gets me the contents of HEAD. How do I get the staged changes from the original repository? A
I have a local git repository which is a clone of a repository on github. Someone has forked the repository and made changes in a new branch on a new repository. I want to move this new branch into my
How can I push to a non-bare git repository, automatically add and commit any changes in the working tree, and then re-checkout the current branch to reflect the changes from that push? I was thinking
How to properly remove a bazaar branch from a repository? What if I want to remove a branch completely, so it would be impossible to find if this branch existed? I'm aware of the remove-branch command
When git clone some repository then it retrieves all branches from it: git clone https://github.com/android/platform_build.git build1 cd build1/ && git branch -a && cd .. then, when I
Is git --bare init wrong? Should it be: git init --bare
In a repository A the folder sub is included as git subtree of the repository S - pointing to master branch. I have forked repository A into F. Now I want to do one of the following in F: change sub
When I git branch -a | grep my_funny_branch it gives remotes/origin/my_funny_branch But when I git branch -d -r origin/my_funny_branch it gives error: remote branch 'origin/my_funny_branch' not foun
i deleted a folder from my local Git repository then i committed and pushed the changes to the remote repository, the files are deleted but the folder and the sub folder are still there. How could i r
would hg remove * when i am at the level of where my local repository copy is , remove it, then of course hg commit and hg push
I have 2 branches in Git, namely master and dev . I'd like to convert dev branch's content into master, that is to say I wanna ditch the state of dev, and change it to how it is like in master, how ca
In another question it was recommend that I try resetting a remote tracking branch to an earlier commit and performing an import a second time. I can't figure out how to do that! I can reset master, b
I ran the git --bare init in a wrong directory(in the server). I see the files branches, config, deps etc., in that directory.. How do I undo it?
I can't seem to find the answer to this seemingly simple question, anywhere: How do you acquire a clean copy of a code repository once you release it? For instance, say I'm at a place in my Git repo
I have a TFS 2013 server setup in a windows active directory domain that hosts a git repository team project called TestGit2. Windows clients are able to communicate with it just fine through visual
I want to create a new shared git repository for a new project (on a VM). I ran git --bare init from /.../git/new_proj.git, but a master branch is not created in the .../git/new_proj.git/refs/heads di
I have two branches off of master, each one for a different feature, and then I have a synthesis branch that combines the two. I committed something to the synthesis branch, but now I see I would have
I accidentally made my Desktop a git repository. How to remove the git-related files from Desktop? I have tried to go to C:/User/my_user/Desktop and un-hide hidden git files but couldn't un-hide them
I started with a piece of code which got split into two small programs each in a different branch. They share a lot of similarities but I'd like to split them into 2 repos so I can work on both at th
I just installed netbeans and connect to my git repository throught ssh. Everything works fine except pushing master branch. Every time I commit some changes on master branch and trying to push branc
I would like to know if I can easily get the last commit sha from a remote repository and a specific branch. I could do a git fetch MY_REMOTE_REPO;git checkout BRANCH_X;git log -1; but it is heavy jus
Is it possible to use a public repository like github and have a branch exist on a private repository? I want my master branch to be public, but I also want to work from a private branch (perhaps on a
I'm sorry if this is covered elsewhere, but I can't find the answer. I have a bare repo, called bare.git which is the repository from which are cloned the dev repos. It all works well. I want to know
I've got the following error in a java project in Eclipse: The project was not built due to Folder contains an active Git repository. The folder cannot be moved, renamed or deleted until the team pro
I have created 2 Git repositories (Dev and stagging) and branches b1, b2 and b3 in each of the repositories. Now how can I merge say b1 of Dev to b2 to Stagging? Is there anything that can be automate
Here is the initial situation: A bare Git repository on a remote server A development Git repository on a local machine Then the remote server crashes. I keep committing changes into my local reposi
I recently used git-svn to clone an SVN repository, for the purposes of maintaining my own branch of an open-source project. I'm also working with others on this branch, so we use a shared Git reposit
I'm using git-svn to work against my company's central svn repository. We've recently created a new feature branch in the central repo. How do I tell git about it? When I run git branch -r I can only
I've got a directory containing utility libraries that were developed in a branch in one git repository, but it turns out they really belong in a different directory in a different project. I've read
My normal git-svn workflow is to do my work on a local branch, then merge to master and git svn dcommit from there to record my commits onto the svn trunk. However, in my current local branch (foo) I'
I created a branch notmaster to commit as well as push some changes. When I was finished with that branch, I merged the changes back into master, pushed them out, and then deleted the local notmaster.
I set up a Github post-receive hook, which runs a script on my web server whenever a push is made to my Github repository. When the script runs, I want it to keep a local bare clone of the repository
I have set up a remote bare repository following exactly this process: http://devlicio.us/blogs/krzysztof_kozmic/archive/2011/08/20/simple-guide-to-running-git-server-on-windows-in-local-network-kind-