git log commit count for every file

I’m trying to get the following from git log: 1- number of commits for every file in the repo (between two dates) 2- number of contributors who edited every file (between two dates) 3- number of distinct contributors who edited every file (between two dates) I’ve tried playing with git log but I wasn’t that […]

Using multiple branches of git notes

I am looking to use git notes to store benchmarking data of commits so I can maintain a history of a project’s performance. I know I can use git notes to attach metadata to commits, but I would like to store the benchmarking data in a separate branch other than refs/notes/commits, something like refs/notes/benchmarks, but […]

How to rewrite history so that all changes made within a folder are removed?

This question is about rewriting git history. Six months ago I decided to make changes over an existing subfolder of my repository, and now I’ve changed my mind and want to undo that and all the associated history. Note, I want changes outside that subfolder should be left as is. So, specifically, I am trying […]

GIT squash per users

All the examples I’ve seen deal with branches where there is only one committer. What I am trying to achieve is an automatic git rebase -i where, for a given branch.. all commit made by a given user will be squashed together. hence, if 3 people work on a branch.. when the branch is merged […]

How to remove a git remote branch

So i’ve got something like this for a repository atm. D-Hewards-MacBook-Pro:project dheward$ git branch -r origin/master unfuddle/master Interestingly because it is the master branch of the unfuddle repo it will not let me delete it using command such as:- git push unfuddle :master One points to unfuddle and the other to another git repo. What […]

getting error when trying “git push heroku master”

Following railstutorial.org, and I’m getting this error when I try to push to heroku: # git push heroku master Counting objects: 85, done. Delta compression using up to 2 threads. Compressing objects: 100% (68/68), done. Writing objects: 100% (85/85), 87.95 KiB, done. Total 85 (delta 18), reused 0 (delta 0) —–> Rails app detected —–> […]

Why github allows unrecognized author to commit

On my own GitHub repository I’ve noticed that there are commits from unrecognized author. I’ve started investigating and I realized that when I push any changes on my remote repository via Visual Studio 2015 – Team Explorer, the changes are pushed successfully even If I change my global .gitconfig settings and set there invalid username […]

Importing a patch from one git repo into another

I have two repositories that share some code, but not all. Occasionally I need to cherry-pick a commit from one repository (the upstream) into the other (the downstream). Exploring in git log or gitk provides the commit hash, but I need an easy way to say “grab commit 1234abcd from repository ../UpstreamRepo and apply it […]

Can I ignore directories from within submodule before submodule update?

I have a submodule in my project that contains lots of media files in the docs/ and demo/ directory. When I ‘git submodule update –init’ the entire repo is downloaded, and then I can add an ignore file. Is it possible to ignore these directories before I update/init submodule?

Redo bad git conflict resolution after push

I want to re-create a merge conflict so I can resolve it correctly the second time round. Example: Branch ‘A’ checked out. Branch ‘B’ is merged In. Conflicts resolved from merge (creates merge commit). Push to remote. Other people merge into Branch ‘A’ and push to remote. Oh dear I have realised my conflict resolution […]

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