Tag: commit

Git new file appears in all branches

I thought a file created on one branch will not appear in any other branches until I merge or rebase the branch? Example: I have two branches: master new_contact_page I checkout the new_contact_page branch. $ git checkout new_contact_page Then I create a new file. $ vi contact_page.html Without doing any Git commands, I switch back […]

How to change author email at commit time with hooks

Question says it all. I want to give my users some privacy by obfuscating their real email addresses in commits by aliases of my own. Is there a hook that can help me do this?

Bitbucket REST interface and GIT; how to get a log history between two tags from a branch

I am building an app to which requires all the commit comments from git commits against a branch on remote origin. Our repository is hosted on a BitBucket server and is a Git repository. I have looked over the Bitbucket (Stash) REST api and I can bring back the git comments by browsing the commits, […]

What's the Git command to determine which commit changed a submodule pointer?

I’m dissecting a series of changes made to a git repo, some of which involved a submodule. I used git blame to find the relevant commit within the submodule, but is there a simple way to locate which commit in my main repo changed the submodule pointer to that commit? Cue simple diagram: 1 <- […]

git filter-branch duplicated commits

I was rewriting my git repository’s author history like explained here, however my original structure turned from D (user 2) <– master | C (user 2) E (user 1) <– branch 1 | | +————————-+ | B (user 1) | A (user 1) into D (user 1) <– master G (user 2, original/refs/heads/master) | | […]

Commit to multiple branches at the same time with git

I have two branches A and B in a project that I am working on. B differs from A by a single commit, which is a section of the code completely independent from what I’m working on for the next while (aka, I will have many commits I want to push to both branch A […]

Subversion: stage files to commit explicitly?

I got very used to git‘s way of having to touch every file you want to commit, and, while at it, double-check the diff. Now at work i have to use svn and i keep commiting stuff accidentially. Is there a way to make subversion behave like git in that i have to tell every […]

How to get SHA of file for specific Git commit?

Is there a way to get SHA of file for specific Git commit? It’s possible with 2 commands: retrieving file git show COMMIT_VERSION:myfile.txt > ~/tmp/myfile.txt calculating SHA git hash-object ./tmp/myfile.txt But, maybe there’s specific command in Git that does exactly that?

how does github 52 week participation work?

I’m confused about my github 52 week participation graphs. Most of the projects that I have on there only have one author (me). However the “commits by owner” on the 52 week participation are zero, even though all my commits are by me. My Page: https://github.com/yule

Git says local branch is ahead of remote after having pulled from remote

I’m sorry if the title isn’t clear, but this is a weird problem. I git checkout to my “stage” branch and git pull to get my partner’s latest changes (which he pushed last night to the “stage” branch on the remote repository), and sure enough, they merge to my local “stage” branch. git log <branch> […]

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