Questions tagged [git-hash]

27 questions
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
  • 402
  • 3
  • 20
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
  • 14,113
  • 34
  • 144
  • 227
1
vote
2 answers

Is a git commit hash trustable?

When using code from unknown third partys on github, I always make sure to check the code that no obvious backdoors that could compromise the security of my system exist. The specific state of the repository I am reviewing is probably bound to a…
Zulakis
  • 6,930
  • 9
  • 38
  • 60
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
  • 340
  • 3
  • 13
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
  • 11,097
  • 10
  • 70
  • 131
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,343
  • 1
  • 12
  • 22
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,147
  • 6
  • 21
  • 35
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
  • 1
  • 80
  • 344
  • 642
0
votes
1 answer

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
  • 1
  • 80
  • 344
  • 642
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
  • 672
  • 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
  • 87
  • 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,361
  • 4
  • 33
  • 59
1
2