Tag: commit

Convert a hash to a more memorized form

I put a git commit hash into each project build automatically, it looks like this: 0ba74ab23528b122923e83b5a7c6d2ce2e5a9313 Hardly it can be easily read and remembered by a developer. I have an option to use a short version of the commit hash looking like this: 0ba74ab Which looks better but still, there is room to make it […]

How do I get a log of ahead commits in SourceTree

In Git, you can call the command: git cherry -v to get a log of what you have comitted locally but not to origin. I am using SourceTree as the preferred GUI for Git, so does anybody know how I can get to view a log of the ‘ahead’ commits in SourceTree?

Relationship between git branches and a release

I’ve used git for sometime now, but it isn’t clear how git commits relate to releases which relate to the master branch. My understanding now is master branch is like any other branch in git. It is just created with git init upon initially making a git repository. Thus, can someone explain the relationship between […]

GitKraken commit to github with userrname

Recently switched to GitKraken and everything is great except that it commits to github not with my account username but with my real name. Wondering how to switch it to the username from github. Here is a screenshot from when I used Github’s client and GitKraken now.

Git push commit without pushhing branch to remote i beforehand

Context: git checkout -b testBranch (from master) DO CHANGES git add -A (changes have been added) git commit -m “This is a test commit” git status No commit shows up and if i push it says that already up to date. So after some research i find out that this happens because there is no […]

I have added a folder with say 10 files and committed the changes.

Now I have removed 5 of those files and I want to amend these changes to the last commit.I havent pushed the commit..Am using gerrit. However when I do git status it shows me Changes not staged for commit->the 5 files which are deleted and untracked files ->which are irrelevant. I want to commit only […]

Git Checkout errors

I am using a script to automatically checkout the first commit of each month, for the last 12 months. Occasionally something strange happens and I am no longer allowed to checkout past commits. The error goes something like this: error: Your local changes to the following files wold be overwritten by checkout: db tests/framework.cpp Please, […]

How to sort a series of snapshots and potential merges

I’m converting a project to git. We have lots of code snaphots as zip files, with an approximate date order, and ‘version’ info. but it’s not as reliable as it could be, and there was some branching and merging as well (manual merge using BC2). I’ve separated out most of the snapshots by major revision […]

Return to previous uncommitted state in git

I have a lot of files. They are change. I’m do commit in git. Then I change files more and more. But now i’m not do the commit. Then i’m do git reset hard to previous(last) commit. How can i return into the last uncommitted state of my folder? (For example 10 seconds before the […]

Recover from Messed up commit to wrong origin

I have an eclipse workspace with directories for various projects:project1, project2 etc. So i created a project1.git in a dropbox folder. I work on my code in project1, my working directory. I have git remote added “project1.git” as origin. So, here is exactly the stupid thing i did.I created a new project, named project2, and […]

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