Re: [git-users] Checking out a branch

2019-08-11 Thread Sharan Basappa
Alexandra,

Thanks. I will try that. However, its a completely new clone.
So, what is remote should be present locally also or is it that Git only 
clones only master to local repo?

Hey, it's because a remote branch.  git checkout -b develop origin/develop
>
> On Fri, Aug 9, 2019, 15:38 Sharan Basappa  > wrote:
>
>> So, I cloned a new repo
>> I checked out a branch - something like git checkout develop (where 
>> develop is the branch name)
>>
>> Git completed this with the following message:
>>
>> Checking out files: 100% (2436/2436), done.
>> Note: checking out 'develop'.
>> You are in 'detached HEAD' state. You can look around, make experimental
>> changes and commit them, and you can discard any commits you make in this
>> state without impacting any branches by performing another checkout.
>> If you want to create a new branch to retain commits you create, you may
>> do so (now or later) by using -b with the checkout command again. Example:
>>   git checkout -b new_branch_name
>> HEAD is now at 923bf87... Removing RRT (open source) files for delivery 
>> to customer. Corresponding changes in nightly regression script. Revert to 
>> earlier version of Tb_Gen.pm (no uvm if changes)
>>
>> I am checking the current branch as follows:
>> [sharanb@clnx1 verifast]$ git branch
>> * (no branch)
>>   master
>> [sharanb@clnx1 verifast]$
>>
>> When I list the branches - git branch -r, I get the following:
>>
>>   origin/HEAD -> origin/master
>>   origin/develop
>>   origin/develop_easel_intel
>>   origin/master
>>
>> I can see develop branch. I am not sure why it fails to checkout.
>> Any idea what is wrong?
>>
>> -- 
>> 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-...@googlegroups.com .
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/git-users/579f4af2-b4a7-44b8-9447-29a2b1dc9c16%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/git-users/579f4af2-b4a7-44b8-9447-29a2b1dc9c16%40googlegroups.com?utm_medium=email_source=footer>
>> .
>>
>

-- 
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/011a517a-8abb-463b-93c4-6a3795213da5%40googlegroups.com.


[git-users] Checking out a branch

2019-08-09 Thread Sharan Basappa
So, I cloned a new repo
I checked out a branch - something like git checkout develop (where develop 
is the branch name)

Git completed this with the following message:

Checking out files: 100% (2436/2436), done.
Note: checking out 'develop'.
You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:
  git checkout -b new_branch_name
HEAD is now at 923bf87... Removing RRT (open source) files for delivery to 
customer. Corresponding changes in nightly regression script. Revert to 
earlier version of Tb_Gen.pm (no uvm if changes)

I am checking the current branch as follows:
[sharanb@clnx1 verifast]$ git branch
* (no branch)
  master
[sharanb@clnx1 verifast]$

When I list the branches - git branch -r, I get the following:

  origin/HEAD -> origin/master
  origin/develop
  origin/develop_easel_intel
  origin/master

I can see develop branch. I am not sure why it fails to checkout.
Any idea what is wrong?

-- 
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/579f4af2-b4a7-44b8-9447-29a2b1dc9c16%40googlegroups.com.


Re: [git-users] Git add vs commit

2018-06-10 Thread Sharan Basappa
Thanks, Konstantin and Philip

On Sunday, 10 June 2018 00:54:10 UTC+5:30, Philip Oakley wrote:
>
> From: "Sharan Basappa" > 
> on: Saturday, June 09, 2018 1:11 PM 
> >I would like to know the difference between Git add vs commit. 
> > I would like to know what happens under the hood when we do git add vs 
> git 
> > commit. 
> > 
> > Basically, I am confused why there are 2 steps before any change is 
> pushed 
> > onto the remote 
> > 
> The two steps are because the Git philosophy is to create a complete 
> change 
> package, rather than a just the changes to a single file (which may need 
> corresponding changes to other files for the commit to be in a working 
> state). So we have two steps. 
>
> The first one  (add) allows bits of a complete change within a file to be 
> 'added' (equivalent to someone from the 1950's putting things in an out 
> box), which can be done repeatedly. 
> The itsy-bitsy change are slowy accumulated (with add when needed), until 
> the user is happy that all is good and test (we hope;-). 
>
> Having competed all the additions, the user is then ready to commit the 
> package of changes as a cohesive integrated change. Thats the point at 
> which 
> the 1950's coder would call for the secretary to take the completed 'out 
> box' and file it. 
>
> You can still look at what changed in a singe file within a commit, but 
> the 
> philosphy is that the cohesive change can be across multiple files. 
>
> Hope that helps with a vision about why it helps. 
>
> Philip 
>
>

-- 
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.
For more options, visit https://groups.google.com/d/optout.


[git-users] Git add vs commit

2018-06-09 Thread Sharan Basappa
I would like to know the difference between Git add vs commit.
I would like to know what happens under the hood when we do git add vs git 
commit.

Basically, I am confused why there are 2 steps before any change is pushed 
onto the remote

-- 
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.
For more options, visit https://groups.google.com/d/optout.


[git-users] git log and missing file

2018-05-28 Thread Sharan Basappa
I was unsure about a specific file being in repository. To check, I did 
"git log ". This returns empty. 

I went up in the directory one level up and did the same.
I get the result.

I then did "git status" but in this case the file in question does not 
appear as untracked or modified.

Finally, I had to clone in a separate directory to find out that the file 
did not exist in the repo nor the directory.

Can anyone guide how to handle this case. It is very common for most of us 
to check if a certain file has been checked in etc.

-- 
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.
For more options, visit https://groups.google.com/d/optout.


[git-users] regarding branch

2017-02-07 Thread Sharan Basappa


I have created a local branch, added few files and pushed them onto remote. 
When 
I pushed my changes for the first time, I used:

 

#git push origin test1 - where test1 is the name of my branch


Hereafter, I have made additional changes and just doing #git push.

Do, I need to do specify remote name every time I push or that is set-up 
after the first time I do push?


Also, when I do #git branch -vv, I see the following: 

master 6727062 [origin/master] ..

test   c745cca ..

* test1  4bd622d ..

testx  2fbfdfc ..


I was expecting test1 branch to track remote test1 but I don't see that 
here.


What Am I missing?



-- 
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.
For more options, visit https://groups.google.com/d/optout.


[git-users] multiple remotes - one for push and one for pull

2016-08-16 Thread Sharan Basappa
Hello All,

I would like to know how one can have multiple remotes such  that one can 
be used for push and one for pull.
This question is related to my other thread (permissions) but I am opening 
a new thread anyway ...

Thanks,

-- 
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.
For more options, visit https://groups.google.com/d/optout.


Re: [git-users] Push and pull permissions

2016-08-14 Thread Sharan Basappa
Thank you all. I think we already use gotolite in our org. though I don't 
know much about it.

We are trying to define continuous integration flow for our group and the 
above question is in that context.

Thanks again.

Regards,
Sharan 

-- 
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.
For more options, visit https://groups.google.com/d/optout.


[git-users] Push and pull permissions

2016-08-14 Thread Sharan Basappa
I would like to know if it is possible to provide push and pull permissions 
per user in Git.
For example, user A can pull but cannot push to remote. Similarly, user B 
cannot pull but can only push to remote.

Thanks,

-- 
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.
For more options, visit https://groups.google.com/d/optout.


Re: [git-users] Git add

2016-08-13 Thread Sharan Basappa

>
> Your assumption is essentially correct. at each 'git add' you get new 
> blobs added to the local repository, and your index gets updated. if you 
> edit and re-add the file the new blob gets added and the index entry gets 
> updated and the old blob is left orphaned. Evenetually the garbage 
> collection (when it runs, either automatically or manually 'git gc 
> ')) will remove such orphaned blobs (and tree and commits if they 
> too are fully orphaned[1]) as long as they are 'too old'.
>  
> You can use 'git fsck' to get a list "lost and found" objects that have 
> yet to be removed, so you can always (within the time limits - 2 weeks?) 
> get your contents back.
>

Thank you, Philip. A correction - I should have written blob and not glob 
:-) 

-- 
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.
For more options, visit https://groups.google.com/d/optout.


[git-users] Git add

2016-08-13 Thread Sharan Basappa
Hello All,

I would like to know the impact of doing "git add"

I assume that git add basically adds a new glob object entry for the file.
Once a commit is done then the glob entry gets linked to commit object 
(through the tree object).

However, what happens in the following case?

A file is added using git add but no commit is done.
After additional modification, the file is added again.
A commit is done at this point.

I assume that commit object will now point to the latest file glob object.
The first glob entry is sort of an orphan. Is this correct?
if this is the case, are these files ever removed by git automatically?

Thanks a lot ...



-- 
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.
For more options, visit https://groups.google.com/d/optout.


Re: [git-users] SHA-1 checksum

2016-08-13 Thread Sharan Basappa

>
> Hello All,
>

I just wanted to say a big thank you. Some of the examples here really has 
helped me get hang of some fundamentals.


-- 
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.
For more options, visit https://groups.google.com/d/optout.


Re: [git-users] SHA-1 checksum

2016-08-08 Thread Sharan Basappa

>
> Well, there are exactly three types of objects in Git repos: blobs, 
> trees and commits.  Files are stored as blobs.  Blobs have no "file 
> names" attached to them; in fact, they keep no associated metadata at 
> all.  Since humans routinely manipulate data kept in files using 
> hierarchical files systems, Git mirrors this approach by using tree 
> objects.  A tree object serves the same purpose a directory does on a 
> file system: it maps human-defined names of the files to their contents. 
> So a tree object contains a set of entries -- each representing a 
> single file or a subdirectory.  Each entry has three "fields" a 
> (simplified) file mode, the hash value of the entry's contents (its 
> address, that is) and the human-friendly name -- taken from the source 
> filesystem.  Subdirectory entries refer to other tree objects and file 
> entries refer to blobs. 
>

Dear Konstantin,

Thanks a lot. So, all the 3 objects types are referenced by SHA hash values 
and searched using these values.
This includes blobs, trees & commit objects. 

-- 
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.
For more options, visit https://groups.google.com/d/optout.


Re: [git-users] SHA-1 checksum

2016-08-08 Thread Sharan Basappa


> 2) At its very bottom, Git implements the so-called 
> "content-addressable filesystem".  Its chief principle is that every 
> unique piece of data is stored exactly once, and these pieces are 
> identified by their contents.  Since use the contents "as is" is 
> unwieldy, its being addressed using -- again -- the cryptographic hashes 
> calculated over those contents.  This what makes Git effectively 
> implement its paradigm where each commit refers to a complete state of 
> all the project's files: even though like 99.9% of the content of each 
> commit a typical big project is the same as its parent commit, each 
> unique chunk of information -- a file or a tree referring to a set of 
> files -- is stored in the repository exactly once. 


Content addressable filesystem. Nicely put. So, sort of content addressable 
memory (CAM) where contents are unique.

Thanks a lot, 

-- 
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.
For more options, visit https://groups.google.com/d/optout.


Re: [git-users] SHA-1 checksum

2016-08-08 Thread Sharan Basappa


> Consider one of my Git repositories.  The file .git/HEAD contains 
>
> ref: refs/heads/hobgoblin 
>
> That points to the file .git/refs/heads/hobgoblin, which contains the 
> hash of the commit which is the tip of the "hobgoblin" branch: 
>
> 92f8f718eb9b19f921f20283e55c56e8dc66ed10 
>
> That point to the file 
> .git/objects/92/f8f718eb9b19f921f20283e55c56e8dc66ed10.  That file's 
> contents aren't in ASCII, so you have to use "git cat-file -p 
> 92f8f718eb9b19f921f20283e55c56e8dc66ed10" to read its contents: 
>
> tree d5d1ad293f8fdd4a4a4e0e9a73c5c3c851126c22 
> parent 39c83b086e141bb00d32737a4e2aae675d795f44 
> author Dale R. Worley  1470669963 
> -0400 
> committer Dale R. Worley  
> 1470669963 -0400 
>
> ... 
>
> So the hash of the tree object is 
> d5d1ad293f8fdd4a4a4e0e9a73c5c3c851126c22 and the hash of the one parent 
> commit is 39c83b086e141bb00d32737a4e2aae675d795f44.  The tree object is 
> in .git/objects/d5/d1ad293f8fdd4a4a4e0e9a73c5c3c851126c22, but again, 
> you have to use git-cat-file to read it: 
>
> 100644 blob 0215040f90f133f999bac86eede7565c6d09b93d-NOTES 
> 100644 blob 
> ef62bfd5a8e81c8ca13372b2436bccf1c0698185-NOTES.MYOB 
> 100644 blob 
> 65dda34dadf753dbfc791b5811f3cd437a666cac-NOTES.XA.recovery 
> 100644 blob 
> 88182ec16035fd4d77c0c1312ce1510f2f8da4b2-NOTES.XB.recovery 
> 100644 blob 
> 73415b6e2ebcd6a384874c0ab40ec70a5112db18-NOTES.freeze 
> 100644 blob 
> 3a4fb8ec6e7c0219c4d7ab002eaaa84abae2c72d-NOTES.gleaning 
> 04 tree c21923c2647ecec7d627a49e51b4e8b5d19344b4.a68g 
> 100644 blob 
> f9a4c46f50234a11f9ad283973ed2f11a4758f2f.aspell.en.prepl 
> 100644 blob 
> 182c2739a5cc69a322a41723d4423ed1d8a6266e.aspell.en.pws 
> ... 
>
> The contents of file "-NOTES" is in 
> .git/objects/02/15040f90f133f999bac86eede7565c6d09b93d.  In this case, 
> that object is in one of the "pack" files.  git-cat-file has to read 
> through the indexes of the pack files to find that. 
>
> The critical ideas are that files are stored by their *contents* not 
> their *names*.  Any particular blob of content has an eternally unique 
> name (its hash), which will be the same in any repository containing a 
> blob with the same bytes.  "tree" objects are used to catalog the names 
> of files and their contents. 
>

Dear Philip, Dale,

Thanks. I think this example helps me a lot.

To clarify,

100644 blob 0215040f90f133f999bac86eede7565c6d09b93d-NOTES

Instead of storing reference to actual file, Git stores reference to the 
content rather (in the form of checksum 
0215040f90f133f999bac86eede7565c6d09b93d)?
Is -NOTES a reference stored by Git. I am thinking where does Git get the 
file name if it does not store it in someplace originally?

The other question is, when it is time for Git to pick up the file 
associated with 100644 blob 0215040f90f133f999bac86eede7565c6d09b93d then 
it starts 
computing checksum of all the objects?

Similarly, referring to tree object d1ad293f8fdd4a4a4e0e9a73c5c3c851126c22, 
one has to again calculate checksum of all tree objects in order to get 
the following contents:
 100644 blob 0215040f90f133f999bac86eede7565c6d09b93d-NOTES 
100644 blob ef62bfd5a8e81c8ca13372b2436bccf1c0698185-NOTES.MYOB 
100644 blob 
65dda34dadf753dbfc791b5811f3cd437a666cac-NOTES.XA.recovery 
100644 blob 
88182ec16035fd4d77c0c1312ce1510f2f8da4b2-NOTES.XB.recovery 
100644 blob 
73415b6e2ebcd6a384874c0ab40ec70a5112db18-NOTES.freeze 
100644 blob 
3a4fb8ec6e7c0219c4d7ab002eaaa84abae2c72d-NOTES.gleaning 
04 tree c21923c2647ecec7d627a49e51b4e8b5d19344b4.a68g 
100644 blob 
f9a4c46f50234a11f9ad283973ed2f11a4758f2f.aspell.en.prepl 
100644 blob 
182c2739a5cc69a322a41723d4423ed1d8a6266e.aspell.en.pws 

Thanks a lot

-- 
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.
For more options, visit https://groups.google.com/d/optout.


Re: [git-users] SHA-1 checksum

2016-08-08 Thread Sharan Basappa

>
>
>  
> You have it in one. 
>  
> Yes that is the reason that git computes the sha1 of the file's contents - 
> it provides integrity, veracity and non-repudiation (the last one is still 
> true though cryo-analysis is getting better, so sha1 is no longer 
> recommended, and Git is looking at how to progress to newer crypto-hashes)
> .
> Once Git has the sha1's of the files in a directory, it does the same 
> again for the 'file' that lists the file names, mode bits and their 
> content's sha1s, and ever onwards up the trees to the commit, which lists 
> the sha1s of its parents.
>  
> So it you have the sha1 of the tip of a branch, such as master, and you 
> have a repo that holds that sha1, then you have the full crypto integrity 
> that your copy (with all its history) is identical to that of the 
> originators - your own Dali, Rembrant, Gogin, hanging in your hall... and 
> it isn't even a replica, it's the real thing!
>  
>

Dear Philip, Michael,

Thanks. It's true that checksums like SHA give a very signature of any 
file. But where things start getting confusing (to me) is when I read *"**In 
fact, Git stores everything in its database not by file name but by the 
hash value of its contents.". *

This is from book Pro-Git. 

So, if Git stores files using just their checksums then

a) how does it look up (or retrieve) a specific file in the database?
For example, if it wants to find a file in the data base then it takes 
checksum and starts computing checking of every file in its database & 
compare?
This looks pretty costly & rather unnecessary to me.

b) how does it get keep track file names that are required when it gives us 
a working copy? 

Thanks again ...

-- 
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.
For more options, visit https://groups.google.com/d/optout.


[git-users] git status

2016-06-01 Thread Sharan Basappa
Folks,

I need some help on git status.

When I do git status in my project directory, I see 3 categories as follows:

1) Changes to be committed:
2) Changed but not updated:
3) Untracked files:

Under "Changes to be committed" - I see files marked as modified & new file

I assume that new file here means that an added file isn't in the 
repository.
I assume that modified here means that a file that is in the repository has 
been modified and also added

Under "Changed but not updated" - I see files marked as modified

I assume that modified here means that file has changed but not added to 
the repository.

Are my assumptions in blue font correct?

There are files that are listed both under "Changes to be committed" (as 
new file) & "Changed but not updated" (as modified file).
For a moment if we ignore untracked files, how do I make sure that I have 
added appropriate files before committing?

Also, what does git do if I add a file second time without modifying it?

-- 
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.
For more options, visit https://groups.google.com/d/optout.


Re: [git-users] recover added file

2016-05-31 Thread Sharan Basappa

>
>
> > As I make changes to my files, I have been adding them to git repo 
> > but haven't been committing them. 
> > Today, due to an incorrect switch to the tool, I ended up overwriting 
> > a file I was working on. 
> > This file was added in repo today. Is there a way to recover that 
> > file? 
>
>   git checkout -- path/to/the/file 
>
> will grab the contents of the file "path/to/the/file" as recorded in 
> the index and create/overwrite it in the work tree with that contents. 
>
> Should you run something like 
>
>   git checkout HEAD path/to/the/file 
>
> then the contents would be taken from the tip commit (HEAD) instead of 
> the index. 


Thanks  

-- 
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.
For more options, visit https://groups.google.com/d/optout.


[git-users] recover added file

2016-05-31 Thread Sharan Basappa
Folks,

As I make changes to my files, I have been adding them to git repo but 
haven't been committing them.
Today, due to an incorrect switch to the tool, I ended up overwriting a 
file I was working on.
This file was added in repo today. Is there a way to recover that file?

Thanks,

-- 
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.
For more options, visit https://groups.google.com/d/optout.


Re: [git-users] How GIT stores data

2016-05-29 Thread Sharan Basappa
Folks,

Having started using GIT, one more question ...

I do some work on a file. Assume the file is version is F.1. I think it is 
fairly done and I stage it (git add) but don't commit.
Now later, I realize that I need to make some more changes to the file. I 
make changes (F.2), add and them commit.

I assume that the commit object will only point to the latest file (F.2). 
Is this correct?
Is there a way to retrieve the previous version of the file (that is, F.1).

Essentially, I am trying to get some intermediate version of a file even 
through I never committed it.
if I cant get F.1, whatever happens to the it as far as git repository is 
concerned?

-- 
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.
For more options, visit https://groups.google.com/d/optout.


Re: [git-users] How GIT stores data

2016-05-22 Thread Sharan Basappa
Dear Philip, Others,

Thanks a lot. I have some follow-up questions.

I am using a simple scenario to get additional clarity.

1) I have 4 files in my branch (a,b,c,d)
2) I modify a
3) I add a
4) I modify b,c
5) I add b,c
6) I commit
7) I modify d
8) I commit d
9) I push to remote

Does step 6) above result in single commit object (single SHA reference) or 
two?

>From a developer engineer's perspective, what does commit signify? Does it 
mean something key development is complete?
I ask this question to understand when a developer would do some 
development but would make multiple commits.

Similarly, if during push step, if it is found that remote is ahead of 
local (and most likely requires merging) then does it mean anything wrt to 
the already computed SHA?
I assume that already computed SHA has no meaning.

Thanks,

-- 
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.
For more options, visit https://groups.google.com/d/optout.


Re: [git-users] How GIT stores data

2016-05-21 Thread Sharan Basappa

>
>
> Do note that there is no file date information stored in the tree/blob 
> data. The only place dates are recored is at the point of the commit. 
> Likewise the only file permission stored is the *nix executable bit
>

 Dear Philip,

So, the snapshot is taken when commit is done?
Also, what does the SHA that is returned when a commit is complete indicate?
is it the overall signature for the snapshot or commit identifier?

Thanks

-- 
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.
For more options, visit https://groups.google.com/d/optout.


Re: [git-users] How GIT stores data

2016-05-21 Thread Sharan Basappa

Thank you, Michael.
 

> Correct. 
>
> Now, just a few months ago, I had these same questions. I hope I have 
> learned this well enough that I can teach it accurately. 
>

-- 
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.
For more options, visit https://groups.google.com/d/optout.


Re: [git-users] How GIT stores data

2016-05-20 Thread Sharan Basappa

>
> Sure. Think of Git as a three layered tool. 
>>
>> The top layer is a polished interface, called "Porcelain", that is 
>> designed to easily manage snapshots and compares and merges of filesystem 
>> trees. 
>>
>> The bottom layer, on the other hand, is a filesystem. Files in this 
>> filesystem are read-only. The names of files are fixed based on their 
>> content. So identical files have the same name, and are stored once in the 
>> file system. 
>>
>> Building up from fixed files that do not change, are directory objects, 
>> that map human understandable filenames to internal names. And, since this 
>> is itself a filesystem object, if everything in a directory is identical, 
>> then the directory entry is identical, and only stored once. 
>>
>> Based on this, it's pretty easy to see that if two commits are completely 
>> identical, then the only thing that differs is the commit object itself, 
>> which will have a time stamp and user comment. 
>>
>> (The middle layer by the way, are low-level tools designed to work with 
>> the files in this filesystem.) 
>>
>
>  
Dear Michael & Philip,

Thanks. I think I am getting a hang of it.

So, when an existing file is modified then I assume that Git computes its 
signature and then checks if such a file already exists.
Is this correct? I ask this because my change can be such that it is same 
as one that was previously committed (sort of reverting back a file).

The other thing I understand is that Git always stores every unique 
instance of a file as it is and not its differences with a reference file.

One more question I have is on the file system. As such when I clone a 
repository, I get full repository and files locally.
So, when I clone a repository, I have full repository and one set of 
project files (depending on the branch I have checked out) locally)

Thanks,

-- 
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.
For more options, visit https://groups.google.com/d/optout.


[git-users] Git life cycle

2016-05-20 Thread Sharan Basappa
Folks,

Git mentions that state of the file as untracked, unmodified, modified and 
staged.

As I understand untracked files are not yet in the respository.
unmodified and modified is understood but what action results in a file 
being in staged state?
is it git add or git commit?

Thanks, 

-- 
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.
For more options, visit https://groups.google.com/d/optout.


[git-users] How GIT stores data

2016-05-20 Thread Sharan Basappa
Folks,

I am pretty much new to Git though I am using it for a couple of projects 
(without much understanding as such).

In Git documents, it is mentioned that Git stores data as a stream of 
snapshots. Compared to other VCS tools, the only difference I am able to 
tell is
that Git stores the entire file for each versions while other VCS tools 
might store only differences.

Can someone help me understand this?

-- 
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.
For more options, visit https://groups.google.com/d/optout.