How to pull after a forced git push?

Suppose I pull changes from a git repo. Then the author of the repo force pushes to the central repo. Now I can’t pull since the history is rewritten. How can I pull the new commits (and abandon the old ones), assuming that the author force-pushed the correct version? I know this is bad git […]

Cygwin: color coding and branch info for git?

Seem to be having a problem because I just recently changed my client for the gitbash to cygwin but i am missing color coding when i do git status for example and also the bash prompt doesn’t include the current branch / rebase etc Does anyone know how to make cygwin look like gitbash? You […]

Is it wise to use branching with one-man git project?

I have a small project on git, on which I am the sole developer. For now, I used only one main branch to actually get it working. Now the project is somehow working and I would like to just implement some new features. The question is, should I create new branch for each new feature […]

How to upload one file repository to Gist, preserving history?

I have a Git repository on my computer with a single file How can I get that as a Gist on Github, preserving history?

Git slow sometimes

When using git on windows normally (such as git push and git pull), it will sometimes be very slow. Running git pull over and over again returns within two seconds most of the time, but about 1/6 of attempts take about a minute. I have set git config –global core.preloadindex and git config –global core.fscache […]

Git – Is there a way to view the number of lines committed by Author?

Does anyone know of a command or script that will output each author that has committed to the project followed by the number of lines they have contributed. e.g. something similar to the following: Author Insertions Deletions Bob Dole 1240 409 Sarah J 481 140 Jim Helper 388 23 Cheers, Ben

Cannot use remote repository in a composer on windows

I have a repository with library. It could be successfully cloned. $ git clone file:////remote/repo/library $ cd library $ composer validate ./composer.json is valid, but with a few warnings But it seems that this repostory cannot be used via a composer inclusion. … “repositories”: [ { “type”: “git”, “url”: “file:////remote/repo/library” }] … Trying to install […]

Git how to give people push access that needs to be merged in by organizers?

My project has quite a few people and I want to give them all push & pull access because right now, they forked the project and when they make changes, they have to push to their fork and send me a pull request. Instead, I want them to be able to clone the main project […]

What does git mean?

I’m using the “Github For Windows” shell and was trying to commit something and came across what looks like an error: C:\Path\Name\ [master +2 ~1 -0 !]> What does +2 ~1 -0 ! mean? NOTE: I fixed the error by modifing every file in the directory and re commiting and pushing, now it’s just [master], […]

Will a commit be garbage collected if it's referred to by tag but not by branch?

I’ve got an annotated tag referring to a commit (does it matter if it is annotated?) and no branch referring there. Will the commit be garbage collected after some time?

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