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 have a git repository with an attached working tree that I'm pushing to a bare repo on a remote. The repository includes a submodule. At the remote end: I check out the repo to a working tree git ch
I'm migrating a repository from svn to git. In this last step, I want to remove tons of files that aren't needed from the history. I'm trying the following command: git filter-branch --prune-empty --i
I used git branch -d myBranch to delete a branch. However, when I am on master and try to checkout a new branch with git checkout, myBranch still appears in the tab-autocomplete. How do I remove the n
I forked the Flask repository and cloned its website branch from GitHub like git clone --recursive https://github.com/lovesh/flask.git -b website Then i configured remote like git remote add upstream
On my server, I host some bare git repositories that I'm working on. I'd like to display some basic statistics about each repository on my website; for now, let's just say I want to do simple stuff li
When I tried to delete a branch in a bare repo, I was told that I can't because I'm currently on it. A bit surprising, as I expected not to be on any branch in a bare repo. Which branch should be ac
I have a bare git repository on a server which I access via SSH. I can push and pull just fine. However, the files I push are created on the server with access rights 644, meaning that only I am allow
Lets have 2 repositories, one containing the actual data repo and a bare repository which is loaded with deltas from the actual data repository by doing a git push from data repo to bare repo. Hope yo
I understood, that a bare repository is for sharing among different developers or machines. Is it possible to create a working copy from a bare repository, e.g. a new developer joins a project?
i checked out a remote branch like git checkout -b newBranch origin/some-remote-branch. but whenever i do a push it is pushed to a new branch newBranch . how to tell git to automatically push to the b
How do I add an empty directory (that contains no files) to a Git repository?
I don't know how to set the HEAD reference for a bare repository. Throw the BareRepositoryException with message Additional information: An error was raised by libgit2. Category = Repository (BareRepo
I have been using git on windows-msysgit. Whenever I try to remove a repository completely either using explorer or using $ git rm -rf ptp/ fatal: Not a git repository (or any of the parent directori
As you might have known that by default, git doesn't enable reflog updates for new bare repositories. The problem is, I have a long history repository but it was created before I set the flag logAllR
This question seams to deal with rewinding the commits from the master branch. Can I use a similar git reset --soft command on a branch in the repo or should I be trying to make sense of git revert?
I want to push my local repository onto my web server which does not have git using ssh. Is this possible, or do you need a git repository such as github to do this? I tried: git init --bare ssh://use
A git submodule is currently on a branch, and I'm not sure not if it's at the tip. How do I get the commit ID of the branch's tip so that I can pull up the submodule if necessary?
I have existing project and I want to add it in git local repository. How can I do that ?
I have a git commit history like this: U / A---B---C---D---E master Nothing points to the commit U, but I know its hash. How can I completely remove this commit from my repository as if it never exi
I have a git repository with multiple branches. How can I know which branches are already merged into the master branch?
This is remote Git repository on server [aaa@web48 proj.git]$ git ls-remote . dfca707432eb53678b37026b160a4bdc7f1ac6c3 HEAD dfca707432eb53678b37026b160a4bdc7f1ac6c3 refs/heads/master 1e09c37443ee75864
I wanna count to total lines of codes in git repository. I've found the answer in google. git ls-files -z | xargs -0 cat | wc -l It works well in local repository. but. I want to count in remote rep
I've made several commits to a local branch, but I'm not sure what the best way to diff what I currently have to my branch's starting state. I know I can do something like git diff HEAD HEAD~6 if ther
I have a branch called develop in my local repo, and I want to make sure that when I push it to origin it's merged with the origin/master. Currently, when I push it's added to a remote develop branch.
How does one verify that files were pushed to a bare repository correctly? Since bare repositories have no working tree, you obviously can't do a simple git log because it isn't picked up as a git rep
How can I push and automatically update working copy of my non-bare remote git repository? Before git people will say that this is unsafe, please let me explain why in my case this would work. I ha
I've accidentally unhitched my master branch from tracking origin master I think. It used to be that I could run git pull and git push and it would know that I meant git push origin master but now it
I am using git for my projects, and some days ago I commited the same changes on on two clients. then I pushed both commits to the central repo. now I have a branch with conflict: git branch * master
I have an active branch (Branch A), but a slew of bugs have come forward, each requiring branches of their own (Branches B-D). The strange thing is, I just can't find anything that explains how I keep
I am trying to maintain a bare copy of a Git repository and having some issues keeping the remote tracking branches up to date. I create the remote tracking branches like this: git branch -t 0.1 origi
We use Git exclusively for our project, but we now are sharing the project code with another team. They grabbed the raw code from our development branch and setup an SVN repository with it. They canno
The 'central' repository had to be set up on a new server, so I created a new remote on my local repo, and pushed to that. But now when I do 'git pull', it claims I am up to date. It's wrong -- it's t
I have two branches, master and mybranch in a git repository. In a local folder cloned from the git repository before adding the second branch, I can only see the first branch, as expected: xxx$ git b
I'm writing a tool to backup all my repositories from Bitbucket (which supports Git and Mercurial) to my local machine. It already works for Mercurial, where I do it like this: create a new empty rep
I have set up some remote tracking branches in git, but I never seem to be able to merge them into the local branch once I have updated them with 'git fetch'. For example, suppose I have remote branch
Is git --bare init wrong? Should it be: git init --bare
I set up a .mailmap file in my git repository, so now running git log --format=%aE in my local repo correctly maps all email addresses as specified in the .mailmap file. But after I push to my bare
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
Basic question: How do I disassociate a git repo from the origin from which it was cloned? git branch -a shows: * master remotes/origin/HEAD -> origin/master and I want to remove all knowledge of
When trying to pull (Team|Pull from the context menu) in a git repository in Eclipse I get Could not get advertised Ref for branch refs/heads/develop error. I guess that's because remote branch named
I'm using trac v1 (which includes the Git plugin) on linux to trac multiple git repositories within the same trac installation. When I add a new repository to this trac installation it tells me: You
I have a central, bare, git repository which all of our developers push to. This is our origin. I use origin to push to a separate, non-bare, repository and overwrite all changes. This is intended to
I was wondering is there a way to prevent 'git push --force' on a repository (only on master branch)? Assume I have remote git repository and do: 'git push' to 'master'. It works. 'git push --force'
I am working on a project with a remote team. They created a branch (r_branch) that I can see when I'm in GitHub: master r_branch (and it tells me that it's 6 ahead) When I do git branch -r, here's w
I was working on a feature branch and I did a git checkout -b feature/other-feature, did some work, committed it and then pushed it to origin feature/other-feature on github. When I created a pull req
This question took me part of the way, but I'm still missing something. I have a single-user repository (so no problems with rewriting history vs push/pull) where I have developed product code and sup
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 created a bare git repo on my EC2 instance, and I have pushed a branch from my dev machine to it. I can run git log on the server now and it looks up-to-date with everything. The dev machine no
I have a bare git-svn repository and did a 'git svn fetch' on it. Running 'git log' doesn't show the updates. I'm sure there are updates as it displayed the files changed after 'git svn fetch' and 'gi
I have 2 non-bare repositories and one bare repositories set up. After the first repository commits to itself and then pushes to the bare repository till here everyhing is normal. Then in the second r