git

git-svn, how to use a directory in trunk as local trunk

i'm inheriting a codebase that has a lot of directories in trunk that really should live in separate repos. all of my development happens in one specific directory, what should be the only thing in trunk. e.g: /path/to/repo/trunk/true_trunk all the tags and branches in the repo refer exclusively to this 'true_trunk' directory. proble...

My Git repository is in the wrong root directory. Can I move it? (../ intead of ./)

Somehow when I 'git init'ed my latest project a month or so ago I ran the command in the directory one directory higher than the root of my project. So my repository is in the ./project directory and not the ./project/my-new-project directory. I don't know how I didn't realize the issue earlier, but I just never looked for the .git dir...

Increasing Cygwin's memory allocation

I just added a ton of images to my local git repo. As a result, when I try to push to our remote repo, I get the error: fatal: out of memory, malloc failed76) My hypothesis is that this is due to a lack of memory allocated to Cygwin. I've tried to increase Cygwin's memory by following these instructions but i can't find the registry...

Error pushing to GitHub - insufficient permission for adding an object to repository database

I'm getting back an unusual error while trying to do a "git push" to my GitHub repository: Counting objects: 8, done. Delta compression using 2 threads. Compressing objects: 100% (4/4), done. Writing objects: 100% (5/5), 1.37 KiB, done. Total 5 (delta 2), reused 0 (delta 0) error: insufficient permission for adding an object to reposit...

How to operate a local branch in git

From here, http://cheat.errtheblog.com/s/git, I think I can recreate a branch in my local repository by $ git branch mytestbranch <then I can may changes as my experimental> My question is how can I forget all the changes I made in the 'mytestbranch' branch? and switch back to my original 's stage/version of my repository? I keep...

"warning: unable to unlink" when dealing with git submodules

I installed a submodule on branch try-submodules when trying to checkout the master branch (which had no submodules), I get the following warning: warning: unable to unlink public/docs/blueprint: Operation not permitted Switched to branch 'master' Browsing the file directory, I can see that everything checked out just fine EXCEPT my...

How to merge a branch into another with override option in git

I am using git and I have two branches: production and master. At this time production is 9 months old and a lot of changes have gone into master branch. I am using capistrano and so I need to push all the changes to production branch so that I could deploy. However when I merge I get tons of merge conflicts. I don't care about merge is...

Ignore folder in stable, but not in devel branch

I have the following folder structure for my project src/ test_unit/ package1/ test_unit/ package2/ test_unit output/ In my devel branch all folders should be version controlled, but the master/stable branch should ignore and not merge test_unit/ and output/ folder. How can I achieve this? With .gitignore it won'...

How can I retrieve commits in "overwritten" branch in Git?

Background I'm working with just one branch - master. 3---------2--------- | 6-------5---------4---------1---------- I made commits 1-3, then realised I wanted to work from commit 1 for the next section of work. I checked out commit 1, then made commits 4-6. Ooops. Commit 3 contains some important ...

git difftool problem: not setting LOCAL, REMOTE variables

According to doc and various answers here git difftool will invoke the specified executable (usually a shell script) with environment variables LOCAL and REMOTE set to the file paths. But when I try, LOCAL and REMOTE are not set. I've tried the following test: git config --global diff.tool mytest git config --global difftool.mytest.cm...

How do I pull a remote branch in git without conflicts?

There is a branch on remote I would like to work on. It is old and I no longer have an old copy of it on my local machine. It is really far behind master. Whenever I attempt to pull it I get conflicts. I just want to create an exact duplicate of the remote branch on my local system. Why would that lead to conflicts? I tried: git pull o...

Production and Development environment sync

Hi, I have a web app on my computer and on web server with ssh. The problem is that I`m developing the app locally on my computer and I want to sync it with the server not by copying files via ftp. Is there any other way? git? ...

How do I stop Github changing my project name?

I'm trying to create a new repository in Github, and I'm having trouble with it's name. It's a C++ project, so I'd like to call it: superproject++ However Github creates me a repo with a url of: git://github.com/alanw/superproject--.git which looks pretty bad. Is this a constraint of Github or git itself? I've played around with...

how to recover an accidently deleted remote git repository from local repository

I've done something like following: (1) clone a remote git repository to local host local# git clone http://www.foo.com foo (2) add another project on a ssh host(bar) as the second remote repository local# git remote add bar ssh://bar/home/project local# git fetch bar (3) done something stupid on the ssh host(bar): bar# rm -rf /ho...

How to get a remote URI

I'd like to get an address of my remote repository, ideally one line only. Ideal would be something like $ git remote show origin fetch_url --some-params-im-not-aware-of git://github.com/ask/celery.git ...

How can I detect copy & pasted code using git?

I just read the git-blame manual page once more and noticed this part: A particularly useful way is to see if an added file has lines created by copy-and-paste from existing files. Sometimes this indicates that the developer was being sloppy and did not refactor the code properly. You can first find the commit that introduced the fil...

Git-pull problem

Hi, I made a new branch "counterflow" on my local machine and edited my .git/config file to look like: [core] repositoryformatversion = 0 filemode = true bare = false logallrefupdates = true [remote "origin"] url = ssh://host/~/Repositories/CFFC.git fetch = +refs/heads/*:refs/remotes/origin/* [branch "master"] ...

git clone fails with "index-pack" failed?

So I created a remote repo that's not bare (because I need redmine to be able to read it), and it's set to be shared with the group (so git init --shared=group). I was able to push to the remote repo and now I'm trying to clone it. If I clone it over the net I get this: remote: Counting objects: 4648, done. remote: Compressi...

Using GIT with GIT GUI - Master and Branching

I am trying out GIT, and using the GIT GUI (from msysgit) with it. I am trying to make a new branch, but somehow it keeps taking over the master branch. The master branch still appears, but not as the actual master. As a result, I also can't merge my new branch into the master, but it requests me to do the opposite (master into new bran...

Git unmerged paths

Long story, made short: I have the following in my git status and need to get rid of the two plugins below: # Changed but not updated: # (use "git add <file>..." to update what will be committed) # (use "git checkout -- <file>..." to discard changes in working directory) # # unmerged: vendor/plugins/pluginA # unmerged: vendo...