Questions tagged [git-hash]

30 questions
1
vote
1 answer

How to update files in my computer whenever they get updated in github?

I know this might sound stupid but I couldn't find a solution on the Internet. I'm working on a project in GitHub and every time someone adds a new file or some new code I have to download the whole files on my computer in order to open them from my…
1
vote
1 answer

Git Hash value of last un-pushed local commit

I have 3 local commits on my branch mainline which are ahead of the remote repo. How to get the hash value of the earliest local commit? Example: A <- HEAD(mainline) local B C D <- origin/mainline synced with remote How to get hash value of commit…
adimoh
  • 658
  • 2
  • 8
  • 20
1
vote
2 answers

Given long git commit how to safely get short commit

If I query the bitbucket api for commits, I get the long version: bitbucket_curl(){ curl -H 'Authorization:Basic YW1JyKg==' "https://api.bitbucket.org$@" } commits="$(bitbucket_curl…
Alexander Mills
  • 90,741
  • 139
  • 482
  • 817
1
vote
1 answer

How to get reference to commits in git

Lets have a git master branch and at some moment lets fork branch for release (release branch will be called R1). Sometimes I need to push commit to both of them(master and R1). Usually I work on master branch, when I'm done I test it, cherry-pick…
Ondrej
  • 817
  • 1
  • 9
  • 16
1
vote
1 answer

Why does git assign same hash to files with different names and location?

Why does git assign the same SHA-1 to files with different names and different locations although contents is the same? 100644 43efcd84207788e5289ee23a9ce95d9f43b13d9a 0 dir1/dir1_d2/dir1_d2_f1.txt 100644…
appu
  • 471
  • 1
  • 8
  • 26
1
vote
1 answer

git push - where's my commit hash - git log is not showing in the history MIRROR repository

I cloned from a GIT repository (latest). At this point, the latest commit in the repository was: a10cb09 I cloned from using the following command (where I set variable r = 1st parameter passed (for repo name aka ansible) in my tiny wrapper…
AKS
  • 16,482
  • 43
  • 166
  • 258
0
votes
0 answers

What is hashed in: git hash-object abc.txt?

I have a file abc.txt whose file size is 3 and contains exact 3 characters abc. If I drag it into https://hexed.it, it is: git hash-object abc.txt then produces f2ba8f84ab5c1bce84a7b441cb1959cfc7093b7f, whether with the --no-filters option or…
Old Geezer
  • 14,854
  • 31
  • 111
  • 198
0
votes
1 answer

`git stash create` does not return a hash

Example (bash): > cd ~/repo1 > git stash create Clearly something is wrong, maybe there is already something stashed? > git stash drop No stash entries found Maybe there is something wrong with git, pick a random other repository and rerun: > cd…
mkk
  • 879
  • 6
  • 19
0
votes
1 answer

Recreate a git commit after branch merging onto branch

I have lost access to laptop where I pushed only the merged branch (onto master) but forgot to update the branch itself. So I tried the following little experiment: $ mkdir g $ cd g $ git init $ echo 1 >> README.md $ git add README.md $ git commit…
malat
  • 12,152
  • 13
  • 89
  • 158
0
votes
3 answers

Latest git hash needs to be speicified in installer's name

Consider a situation in which Git is installed in Windows and is available only in Git Bash, not Windows cmd environment. Having a vdproj to create installer for an application, but need to intercalate the latest git hash to the MSI package's name.…
hamidi
  • 1,611
  • 1
  • 15
  • 28
0
votes
1 answer

How can I get the hash of a commit immediately before a faulty commit?

A while back there was a commit that pushed some deletes, a few good, a few not so good. It is time to restore the deletes that should not have happend. The following line does come up with a list of all the files that need to be restored: git…
Sam Carleton
  • 1,339
  • 7
  • 23
  • 45
0
votes
1 answer

get age of git commit using hash

If we have a git commit hash: 42f35295744738750a665dc846400c8040659d03 is there a way to determine/calculate the date it was created without any more info?
Alexander Mills
  • 90,741
  • 139
  • 482
  • 817
0
votes
0 answers

Accessing githash of a conda-installed package

I have some code that runs simulations and saves the results into text files. To ensure reproducibility, I was also saving the git hash of the last commit , so that if I look a simulation several months later I can know exactly which commit was used…
Javier
  • 722
  • 4
  • 14
0
votes
0 answers

How can I convert a git hash to a byte array with length 20 in C#?

How can I convert a git hash to a byte array with length 20 in C#? At the moment I represent the git hash as a string: string gitHash = "0x29932f3915935d773dc8d52c292cadd81c81071d"; I have tried this: byte[] gitHashBytes =…
Cryt1c
  • 97
  • 1
  • 1
  • 11
0
votes
2 answers

How to see the difference between two identical revisions?

TL;DR different ancestry, empty diff, different program. How to see what the differences are? The answer to the question, I thought, should be: if they are identical, there are no differences. What's been happening to me right now is that I have…
gurghet
  • 7,591
  • 4
  • 36
  • 63
1
2