git merge: Removing files I want to keep!

How can you merge two branches in git, retaining necessary files from a branch? When merging two branches, if a file was deleted in one branch and not in another, the file is ultimately deleted. For example: A file exists in master when you make a new branch you remove the file from master since […]

How can I list all tags in my Git repository by the date they were created?

I need some way to list all tags in my system by the date they were created but am not sure if I can get that data via git-log. Ideas?

git pull fails “unable to resolve reference” “unable to update local ref”

Using git 1.6.4.2, when I do a git pull I get this error: error: unable to resolve reference refs/remotes/origin/LT558-optimize-sql: No such file or directory From git+ssh://remoteserver/~/misk5 ! [new branch] LT558-optimize-sql -> origin/LT558-optimize-sql (unable to update local ref) error: unable to resolve reference refs/remotes/origin/split-css: No such file or directory ! [new branch] split-css -> origin/split-css (unable […]

Git log to get commits only for a specific branch

I want to list all commits that are only part of a specific branch. With the following, it lists all the commits from the branch, but also from the parent (master) git log mybranch The other option I found, was to exclude the commits reachable by master and gives me what I want, BUT I […]

Reset git proxy to default configuration

I installed Socat to Use the Git Protocol Through a HTTP CONNECT Proxy, then I Create a script called gitproxy in your bin directory. #!/bin/sh # Use socat to proxy git through an HTTP CONNECT firewall. # Useful if you are trying to clone git:// from inside a company. # Requires that the proxy allows […]

Making Git retain different section content between branches

I’m developing a Userscript that my employers have asked me to begin to manage via Git. Right now, I have a stable file and a beta file, so that everyone in the organization can install the stable code but can choose to help test the beta additions instead, if they want. Some portions of that […]

Is there a way to squash a number of commits non-interactively?

I’m trying to squash a range of commits – HEAD to HEAD~3. Is there a quick way to do this, or do I need to use rebase —interactive?

Git commit that doesn't override original authors in git blame

I’ve used a perl script to modify all tab characters in a php git repository and changed them all to 4 spaces. $ find -iname \*.php -exec perl -pi -e “s/\t/ /g” {} \ I can commit this change with git commit, but it will mark me as the author of all changed lines inside […]

Git hangs indefinitely – broke with osx credential helper I think

I got tired of typing my password for my bitbucket repo so I looked up a way to use ssh keys but happened upon the osx credential keychain. I thought I had installed it all correctly by following along with what was instructed in the git-scm book but something bad happened…I can’t use git at […]

git undo all uncommitted changes

I’m trying to undo all changes since my last commit. I tried git reset –hard and git reset –hard HEAD after viewing this post. I responds with head is now at 18c3773… but when I look at my local source all the files are still there. What am I missing?

Git Baby is a git and github fan, let's start git clone.