Username and password in command for git push

It’s possible to clone down a git repository, specifying username and password in the command. Example: git clone Is it is possible to also specify the username and password when pushing? So that, for example, running git push origin –all will then output asking for a password. I want this in one command. (I […]

Amending the message of Git commit made before a merge

I committed some test code before merging in a remote branch. This merge had a lot of conflicts and took some serious time to put right. So my history looks something like this: 7ab562c Merge from remote branch … whole load of commits brought across from the remote branch… f3e71c2 Temporary TESTING COMMIT The test […]

When would one need git-rebase?

Everytime I read the git–rebase documentation, I get lost. It feels to me like a kind of a low-level operation (read: dark magic). Quoting the docs: Assume the following history exists and the current branch is “topic”: A—B—C topic / D—E—F—G master From this point, the result of either of the following commands: git rebase […]

How to retain commit gpg-signature after interactive rebase squashing?

When I want to squash some commits by interactive rebase: git rebase -i HEAD~3 And then: pick cbd03e3 Final commit (signed) s f522f5d bla-bla-bla (signed) s 09a7b7c bla-bla (signed) # Rebase c2e142e..09a7b7c onto c2e142e … The final commit haven’t gpg-signature despite that all of those commits have same signature. Is it possible to retain commit […]

git and CR vs LF (but NOT CRLF)

This may sound like a redundant question (and may very well be a redundnant question) but I can’t find the answer. Here’s the situation: My application is creating text files that have CR’s as line endings. More specifically I’m not explicitly setting the line endings to CR, it just happens to be the output of […]

Converting svn to git, how to get the branches not to be just remote in the svn repo?

I’m quite new to git and I’m trying to move a svn repository to git. I followed the guide below so now I have a git repo on my server So, if I do “git branch” git replies “* master” and if I do “git branch -r” i get a list of all the […]

How to get commit history for just one branch?

Let’s say I created a new branch my_experiment from master and made several commits to my_experiment. If I do a git log when on my_experiment, I see the commits made to this branch, but also the commits made to master before the my_experiments branch was created. I would find it very useful to see the […]

Add ignored config file to git repo as sample

I have an repository for an app that I’m working on that includes a configuration file. Currently, I distribute with a .dist extension, and have the user rename the file before editing it. nate:~/myAwesomeApp% git ls-files .gitignore README config.dist glorious_support_lib.p bestProgramEvar.f90 This is fine and dandy, and the actual config is ignored. nate:~/myAwesomeApp% cat .gitignore […]

Cannot push to github repo

My repo: shadyabhi@archlinux-N210 ~/github/learnajax $ cat .git/config [core] repositoryformatversion = 0 filemode = true bare = false logallrefupdates = true [remote “origin”] url = fetch = +refs/heads/*:refs/remotes/origin/* shadyabhi@archlinux-N210 ~/github/learnajax $ git config -l merge.tool=vimdiff github.token=1095de7027bVVVV01cfAAAAAa5fc8f6 color.ui=auto core.repositoryformatversion=0 core.filemode=true core.bare=false core.logallrefupdates=true remote.origin.url= remote.origin.fetch=+refs/heads/*:refs/remotes/origin/* shadyabhi@archlinux-N210 ~/github/learnajax $ git push -u origin master Password: […]

Git push – suboptimal pack – out of memory

I could really use some help here. I just created a new bare repo to act as a production target for dev pushes. I also have the working web directory on the server as a git repo. The server is running git on centos5.5 After creating the new repo in the web directory, I […]

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