git

Removing duplicate db migrations from git repository

I'm trying to deploy a rails app to Heroku and I'm running into some basic git problems. I'm new to this all -- rails, git, heroku -- so I'm afraid I'm getting lost on what's probably a fairly basic concept. I've pushed the app to Heroku, but when I'm migrating the db ($ heroku rake db:migrate), I keep getting the following error: rake...

Will I run into trouble with this Git rebase workflow?

I've just learned about rebase, and I've been strongly warned not to rebase commits after they have been pushed to a remote. I want to make sure I'm not going to explode my repository Example commit history foo W---X---Y / \ master A---B---C---D---E---Z---F---G Here, all commits on the maste...

Export Entire Git Repo to SVN including Branches

Long story short, I have a git repo with several branches, and I would like to move it to an SVN repo while maintaining all of the branches and commit history. So far I have not had much luck, most of the methods I have found do not migrate the branches as I would expect. (they are combined, or ignored, or eaten by a grue) I was plann...

Moving my SVN local file repo to GitHub

I have a local file SVN repo of a project that needs to move to GitHub. I know from what I've read on the GitHub site and a related question here on stack-overflow that it's a simple matter to move the repo from an SVN server into the GitHub repo. But my problem is that I have a local file repository. What is the recommended way of ...

Git Alias Problem

I was trying to set up some git aliases by adding these lines to my ~/.gitconfig file: [alias] st = status ci = commit br = branch And when I go to run these commands in the terminal: git st, I get the following error fatal: cannot exec 'git-st': Not a directory. I do not know what the problem is and I have looked online and can...

VS 2010, Git, and a Solution with Multiple Projects

Do I need to create a repository for each project or just one that encompasses all of the projects in this solution? ...

Push a branch of a git repo to a new remote (github), hiding its history

My organisation is preparing to release an open-source version of our software using github, however I'm not sure the best way to approach this: We have two branches master and release, master contains some proprietary components that we have decided not to release, and release contains the cleaned-up version that we want to distribute....

How can I use Pik for Ruby in Git Bash on Windows?

I'm running multiple versions of Ruby (and Rails) on Windows and use Pik to switch between them. At the command line, I'm able to call > pik list 186: ruby 1.8.6 (2007-09-24 patchlevel 111) [i386-mswin32] 192: ruby 1.9.2p0 (2010-08-18) [i386-mingw32] to get a list of ruby versions available, and use > pik 192 > ruby -v ruby 1.9.2p0...

.gitignore wildcard not working?

Super quick one. Here is my .gitignore (at the root level of my repo # Makefile stuff LIVE-* .install-post-all When I do this, The LIVE-* bit isn't working: $ git status # On branch master # Untracked files: # (use "git add <file>..." to include in what will be committed) # # pm-h8/etc/apache2/conf.d/LIVE-vhost nothing added to ...

How to get back modified file after git checkout and git pull?

I've modified a file, then I want to get latest version from remote. So I run git checkout to revert the file, and run git pull to get latest version. After that, I found that I need the modification of the file. Is it possible to get it back? Thanks! ...

Best way to deploy git projects (with submodules) to FTP server.

Hey guys. There is capistrano but that only works for ssh servers, which a lot of our clients aren't. We also make use of git submodules extensively. What is the best way you know of deploying git projects (with submodules) to FTP servers? I've tried Beanstalk and Springloops v2 but they are both falling quite short. Beanstalk often fai...

Merging Xcode project files

There are often conflicts in the Xcode project file (Project.xcodeproj/project.pbxproj) when merging branches (I'm using git). Sometimes it's easy, but at times I end up with a corrupt project file and have to revert. In the worst case I have to fix up the project file manually in a second commit (which can be squashed with the previous)...

What is the name of cookie-like creature on git homepage logo

Hi, For years I suffered from a question of what is the name of creature, that looks like a cookie, and located at git homepage header logo. And are there any pictures of same creature? :) ...

GIT: Push a commit in two branches

Hi, how do I push a commit in two branches? I can't use "git push", because then it pushes to three branches, and i just want the commit in two of them.. Ive tried a "git merge HEAD --commit id from branch A--" in branch B, but then it takes everything from branch A and merges with branch B. I just want the last commit and not ever...

How to remove a branch named "--orphan"

So I was trying to create an orphan branch. I tried a couple of things and one of them (git checkout -b --orphan newbranch) managed to create a branch called "--orphan"; now it won't let me delete it using git branch -d --orphan. I've also tried using quotes and escape characters. Nothing seems to work. I also tried using gitg to delete ...

Git push error: ssh: Could not resolve hostname domain.com[:7555]: nodename nor servname provided, or not known

I can't seem to use Git to push to the server. However, I can SSH to the box. I can't figure out why: $ cat .git/config [core] repositoryformatversion = 0 filemode = true bare = false logallrefupdates = true ignorecase = true [remote "server_idm"] url = ssh://[email protected][:7555]/home/usern...

Git conflicting commits

I'm working in a multi-user git environment. My workflow is to work in a branch, and pull from the remote into local master, then rebase my working branch, merge the branch with local master, then push to the remote repo. In the most recent pull there 6 new commits, one of them my code needs to take precedence over. If I rebase, I'll...

git: can't push (unpacker error)

Hi all. I have this problem when i try to push in git: error: insufficient permission for adding an object to repository database ./objects fatal: failed to write object error: unpack failed: unpack-objects abnormal exit To ssh://<repo url>/<repo dir> ! [remote rejected] master -> master (n/a (unpacker error)) error: failed to push so...

Git undo local branch delete

I just deleted the wrong branch with some experimental changes I need with git branch -D branchName. How do I recover the branch? ...

Installing git to be used in a multi-user system

I need to install git on a Ubuntu server that will be shared and accessed by multiple users. I assume I will use git+ssh, so each user will have a system account, but how do I go about installing git and a repository so that each user can push/pull over a local IP? ...