1 IF I have only with partial SHA 1 I have . what will work?

On Thu, May 7, 2020 at 5:35 PM Kunal Chauhan <atkunalchau...@gmail.com>
wrote:

>
> IF I give
>  git show ab49e09032ad  like means to some initial commit id that I have
> not whole SHA , then it will work.?
>
> On Thu, May 7, 2020 at 3:31 PM Konstantin Khomoutov <kos...@bswap.ru>
> wrote:
>
>> On Thu, May 07, 2020 at 02:27:56PM +0530, Kunal Chauhan wrote:
>>
>> [...]
>> > I went through the git doc url but still it is not clear to me* how
>> > can i search particular commit exist or not ?*
>>
>> Depends on how you define "particular commit" and how do you define
>> "exists".
>>
>> If you know it's SHA-1 name (its "hash", such as
>> "ab49e09032ad1fd40f0123f58a3d6c90ea451ec2"), the answer is to run
>>
>>   git cat-file -t <sha1_name>
>>
>> This command either outputs a single word describing the type of the
>> object identified by <sha1_name>, and exits successfully, or prints out
>> a "not found" error message and exits with the non-zero error code.
>>
>> Note that this command is quite a low-level one, and it searches the
>> whole local Git repository it was run on - paying no attention to
>> branches, tags etc. It just traverses through everything the repository
>> contains and searches for the specified name.
>>
>> Note that if you merely want to see whether a commit exists "as a user",
>> just run
>>
>>   git show <sha1_name>
>>
>> This command will either format you the message describing the commit
>> and the diff of its changes or exit with an error message.
>>
>>
>> If by saying "particular commit" you mean something else - such as a
>> commit which introduced or removed a particular line of text, or a
>> commit whose commit message contains certain text, the answers will be
>> different, and you need to narrow your question down.
>>
>>
>> If by "exist" you mean something less broad - like whether a commit
>> exists on a particular branch or is reachable via a particular tag, -
>> the answers, again, will be different.
>>
>> [...]
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Git for human beings" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to git-users+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/git-users/20200507100117.lq4gnccx3ppjfqpv%40carbon
>> .
>>
>
>
> --
> *Thanks with Regards!*
>
> *Kunal Chauhan*
> *Mob:09813614826*
> *Mob:08860397903*
>
> *E-mail:atkunalchau...@gmail.com <e-mail%3aatkunalchau...@gmail.com>*
>
>

-- 
*Thanks with Regards!*

*Kunal Chauhan*
*Mob:09813614826*
*Mob:08860397903*

*E-mail:atkunalchau...@gmail.com <e-mail%3aatkunalchau...@gmail.com>*

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/git-users/CACEFAc2ZsqUBiou7YZjS8oZqyPVqzdStHM2VRneAY-%3D_pqqfxA%40mail.gmail.com.

Reply via email to