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 […]
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?
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 […]
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.
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 […]
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 […]
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, […]
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 […]
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 […]
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 […]