Git For Beginners: Difference between revisions

From Cheaha
Jump to navigation Jump to search
(Initial save for the page)
 
mNo edit summary
Line 1: Line 1:
[https://en.wikipedia.org/wiki/Git Git] is a version control system for tracking changes in computer files and coordinating work on those files among multiple people.
[https://en.wikipedia.org/wiki/Git Git] is a version control system for tracking changes in computer files and coordinating work on those files among multiple people.


==Configuration==
 
== Configuration ==
To configure user information for all local repositories use the following commands:
To configure user information for all local repositories use the following commands:


Line 13: Line 14:
</pre>
</pre>


==Initializing a git repository==
== Initializing a git repository ==


To initialize a new git repository, run:
To initialize a new git repository, run:

Revision as of 21:04, 18 June 2018

Git is a version control system for tracking changes in computer files and coordinating work on those files among multiple people.


Configuration

To configure user information for all local repositories use the following commands:

  • Set the name you want attached to your commit transactions.
 git config --global user.name "[name]"
  • Set the email you want atached to your commit transactions
git config --global user.email "[email address]"

Initializing a git repository

To initialize a new git repository, run:

[ravi89@login001 Tutorial_June_2018]$ git init test
Initialized empty Git repository in /data/user/ravi89/HPC_Training/Tutorial_June_2018/test/.git/
[ravi89@login001 Tutorial_June_2018]$

To make an already existing directory, a git repo, run:

cd EXISTING_DIRECTORY
git init