git

Cannot remove git repository completely

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 directories): .git it errors out "The data present in the reparse point buffer is invalid" or the fatal error above. What's wrong with me/git? ...

Anonymous branch after doing git reset

Background: Swip was working on a test project solely for the purpose of trying out git. This is a local one-person repository that has not been shared so swip did a reset hard in order to obliterate some unwanted commits: :git reset --hard 6aa32cfecf4 HEAD is now at 6aa32cf auto commit Sun Feb 28 16:00:10 -0800 2010 Then swip...

Git convention to indicate throw away branches

Scenario: Person A creates an experimental branch to solve a problem. Person B gets interested and wants to check the code, due to laziness person A pushes to his github rather than configuring his workstation to let person B pull directly from him. A and B is hacking away, person C sees the activity on github and clones, eager to chec...

git: put a branch in a subdirectory

Hi, I have a git repository (at github.com) with two branches: master and gh-pages. I would like to have the gh-pages branch in a subdirectory, so that I don't need to switch branches every time. repo/ (content of the master branch) gh-pages/ (content of the gh-pages branch) Is that possible ? ...

Techniques to handle a private and public repository?

I have an open source'd website. Some content is "private" such as connection parameters, as well as files that the open source version doesn't need (eg. advertising templates). Essentially I'm trying to maintain two versions: A public site that has a unique identity (advertising, Google Analytics account, link for associated forum an...

How do I setup git with no central repository?

Three of us in the office are on Mac laptops and we use git day to day. We want to share a repo with each other without setting up a central repo. Dave pushes to Sally who pushes to Chandu. Chandu can pull from Sally and Dave. Is there a good way to do this? ...

git: undo a merge?

Within my master branch, I did a git merge some-other-branch locally, but never pushed the changes to origin master. I didn't mean to merge, so I'd like to undo it. When doing a git status after my merge, I was getting this message: # On branch master # Your branch is ahead of 'origin/master' by 4 commits. Based upon the instructions ...

Finding the date/time a file was first added to a git repository

Is there a simple git command to determine the "creation date" of a file in a repository, i.e. the date it was first added? It would be best if it can determine this even through file renames/moves. I'd like it to be a computer-readable one-line output; it may be that I haven't figured out the correct git log <fname> options to do this...

How to guerilla VC with git while forced to use CVS at work?

Hi, My place of work currently uses CVS. A git migration is planned but it might be a long time coming. In the mean time I have a one-man project, and have decided to use git for my own personal development. The branching, staged commits, rebasing etc. has been fantastic! But unfortunately at some point this project, and its history, ne...

DVCS how structure with large integrated code base, with multiple projects sharing much common code?

I have a cvs repository, with mostly java code. Each package sits in it's own top level dir, like so, with the sourced laid out in typical java fashion. $CVSROOT/my.domain.module1/src/my/domain/module1 $CVSROOT/my.domain.module2/src/my.domain/module2 $CVSROOT/my.domain.share1/src/my/domain/share1 This means we can write build scripts...

What are some of your favorite settings in Git configuration files to make Git Fun?

What are your favorite Git configuration settings which make your life easy while working with Git? ...

Problems with first upload to github

My first upload to github and I'm having the following issue with the command: dan@dan-netbook:/opt/lampp/htdocs/myProject$ git push origin master error: unable to create directory for .git/refs/remotes/origin/master error: Cannot lock the ref 'refs/remotes/origin/master'. Everything up-to-date I get this error while following t...

What is the best practice for dealing with passwords in github?

I've got a little Bash script that I use to access twitter and pop up a Growl notification in certain situations. Whats the best way to handle storing my password with the script? I would like to post this script on GitHub, but I'm wondering what the best way to keep my login/password private while doing this is. Currently the password...

Git pull cygwin not a git-command

Hi I just installed git cygwin on my windows pc at work, but somehow git pull doesn't seems to be working. the out put is : git: 'pull' is not a git-command. See 'git --help'. Did you mean this? pull Cant seem to figure this one out, this works fine using the msysgit version. ...

How can I 'mirror' my git repository locally?

Hi, I have followed the following instructions in setting a git repository locally in one of my hard drive (1): https://trac.webkit.org/wiki/UsingGitWithWebKit I would like to know if it is possible for me to set up another repository in a different hard drive which mirrors the one I setup in (1)? By mirrors, I mean if I commit some ...

Git: How to revert everything exactly to the state of a prior commit?

If there have been commits and many changes since an earlier commit, is there a simple way to revert everything to the exact state of that earlier commit? If so, is it possible to easily switch back to the current state if I should so desire as well? I've realized that this old commit is actually the correct one, and want to maintain a...

Is git suitable for one developer without server

I am a single developer without another computer to backup my projects on. I'm looking into source controls and I came across git but all the setup tutorials are targeted to an external server. I used to use SourceGear Vault, but seeing that git is getting alot of attention, I might as well familiarize myself with it. I do not always hav...

Automatically pulling on remote server with Git push?

Here's what I'm trying to do: I have a GitHub repository, a portion of which I'd like to make web viewable. Right now I've cloned the repository on my own server and it works well, but in order to keep it up to date, I have to manually login and pull the latest changes. I'm not sure if this is the best idea (or the best approach), but ...

What is a good git server frontend for self hosted git repositories

I am planning on deploying git for a project I am currently working on and was wondering if there are any free softwares that provide an easy to use web view of the git repository. I am primarily interested in using the front end to track changes, see diff information etc. There is a list of such front ends available here. Does anyone ha...

Git push current branch to a remote with Heroku

I'm trying to create a staging branch on Heroku, but there's something I don't quite get. Assuming I've already created a heroku app and setup the remote to point to staging-remote, If I do: git checkout -b staging staging-remote/master I get a local branch called 'staging' which tracks staging-remote/master - or that's what I thoug...