Tag: commit

What is the difference between git commit and git commit-tree

I am reading about git objects: blob, tree, commit, tag. In order to have a better understanding of how git works, I tried some low level command like write-tree and commit-tree. mkdir test; cd test –> git init I create a file and git add file. I can see a blob and tree object are […]

Get the commits made by specific authors (more than one)

If I want to get Alice‘s commits I use git log –author ‘Alice’. But what if I want to include there Bob‘s commits as well? I tried the following: git log –author ‘Alice|Bob’ git log –author ‘Alice,Bob’

Does git smartly handle a zip archive in which only one of the files changes regularly?

In one of my git projects, I have a zip file which bundles a set of java libraries. The zip file is 4.5MB and contains 11 files. Only one of the contained libraries is changed regularly, the one that I’m working on (which is in the order of 50KB). The other libraries are static. It […]

How to automatically generate commit message

In some (very) rare occasions, I make some changes in my repository that are so self-explanatory that a commit message describing my intentions is somewhat useless. In these cases, I would like the commit message to basically just list what files I’ve added/removed/edited. For instance: Added ‘dog.h’, ‘cat.h’ A manual commit message would look like […]

How do I preserve the timestamp if I split a commit via git rebase –interactive?

If I use git rebase –interactive and set one line to “edit”, I can say git reset HEAD^ git add -p git commit -m “First part.” git commit -a -m “Second part.” In other words, I split a commit. Unfortunately, this creates current timestamps for the two new commits, which makes the history look funny. […]

Remove committer information from git commits

I have rebased a branch and now all its commits have committer section which I would like to remove completely (not just changing it’s fields). Is it possible without losing the original author info?

How to merge files and commit them using egit and Eclipse?

What are the recommended steps for committing changes to the main branch with Eclipse + egit? I have been using Eclipse and svn for a long time and everything works beautifully there. Whenever I am about to commit a change, my flow is the following: synchronize with workspace look for conflicts when conflicts are found, […]

How to use 2 different global git configs?

I am using the github client and sourcetree by atlassian. I wanted to use 2 different global git configs for each software. At the moment I have to edit and check every commit my autor and email name. So how can I specify a unique config for each git program that I use. king regards

git alias: Commit with arguments & push in a single command

I try to convince my coworkers to leave svn and switch to git. One problem I see coming is: It’s complicated and error-prone to have to do git commit and git push separately. So I was thinking about a git ci alias, which commits the changes and pushes it right to the server. I know, […]

Is there an upper limit to the number of commits a git repository can handle?

I’m wondering if there’s an upper limit to the number of commits that a git repository can handle. In a solo project I’m working on right now, I’ve been coding locally, committing/pushing changes in git, then pulling the changes on my development server. I treat this as an easier alternative to working locally and uploading […]

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