----- Original Message ----- 
  From: Adam S 
  To: Git for human beings 
  Sent: Sunday, April 10, 2016 7:48 AM
  Subject: [git-users] New to Git. Really confused.

  Hi all,

  I'm new to git and really confused.

  I will be working on a collaborative project and so will need to use it.

  So far I've learnt how to intsall git and create a local repository, but 
thats it. Anything else I do seems to not work and I get the message:

    repository '/Desktop/git-test/' does not exist

  even though I can "ls -la" the contents of the directory.

  What now?

  I need to learn how to:

    a.. Branch
    b.. Commit
    c.. Merge
    d.. Tell git which files to commit and which not to
    e.. Hook in to a remote server (can I use GitHub to test on?)
  Any help is very much appreciated! 

Hi Adam,

Getting used to Git and how it works, which is very different from old style 
centralised storage systems, can take a while.

Getting the (distinctly different) concepts clear is very important.

First, as a DVCS (Distributed Version Control System), your primary repository 
is distributed to you. i.e. you hold a personal copy of the respository 
locally, so that you can do anything you want with it. The control has been 
distributed to you, Yeah!

How do you know if you have a local respository - look for a directory/folder 
called '.git' (on Widows, set 'show hidden files/directories'). You should have 
a "/Desktop/git-test/.git" for the one you mention [*]. If not it means you 
have not yet done the step of getting your own copy, called cloning [see the 
command 'git clone <...>']

Take the time to read https://git-scm.com/book/en/v2 or https://progit.org/ etc.

Things to note: underneath Git, when  you commit what you think of as a change, 
git actually takes a complete snapshot of the whole directory file system 
(almost as if it zipped the directory). 

It has fancy compression beneath, and tends to show commits as if they are 
changes, but it is a snapshot. This means that any idea that you (git) works on 
individual files needs to be unlearnt, and the new views embraced. 

Likewise branching is easy (remember you have full control) and takes up no 
memory (a few bytes). Keep you commits small (i.e. do lots of little changes; 
this greases the wheels of the work flow), even if at the end your upstream 
management wants them all squashed into a single mega-commit.


[*] watch out for Windows symbolic names. Your "/Desktop" is probably not there 
at all, but at "C:/user/somewhere" you may need to use that path.

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.

Reply via email to