GIT is a version control software that helps us to manage the file versions.
Compared to traditional file revision management software like SVN, IBM Synergy etc( which are centralized version control management system), in GIT we've local repository as well as remote repository(Distributed version control management system).
Note: It is important to understand that GIT and GitHub are two different entities. GIT is basically a version control software. Where as GitHub is a platform or server space where we can manage our software with multiple collaborators. GIT can be used without having any GitHub account, but in order to utilize its full potential we may use both GIT with GitHub as remote repository.
To understand in detail you may browse the official documentation,
https://git-scm.com/doc
Step 1: In order to begin with GIT, we need to install GIT from official link below,
https://git-scm.com/
Step 2: Create a GitHub Account
https://github.com/
Step 3: Create a repository on the local machine. Open a folder where you want to create a repository, right click and select 'Git Bash Here',
now a command window shall open. Further operations are based on command interface discussed in step 4.
Step 4:
i. Create a Git repository
$ git init
ii. Add the files in your new local repository. Next step is to push these files onto local repository.
$ git add .
indexes all the files in the current folder.
iii. Commit the files that you've indexed in your local repository.
$ git commit -m "message for the commit. This helps identify on what changes you've committed into the repository".
Now we need to push these files from local repository to remote repository on GitHub.
For this add the URL of the repository that you can find in the GitHub
$ git remote add origin <remote repository URL>
# Sets the new remote url to label 'origin'
$ git remote -v
# Verifies the new remote URL
Push the changes in your local repository to GitHub.
$ git push origin master
Your first set of files are committed to local repository and also pushed onto the remote repository. This can be verified on GitHub as well.
Commonly used GIT commands,
https://github.github.com/training-kit/downloads/github-git-cheat-sheet.pdf
This Blog may contain copyrighted material, the use of which may not have been specifically authorized by the copyright owner. This material is available in an effort for education purpose only.
This should constitute a 'fair use' of any such copyrighted material(referenced and provided for in section 107 of the US Copyright Law).
If you wish to use any copyrighted material from this blog for purposes of your own that go beyond 'fair use', you must obtain expressed permission from the copyright owner.
Compared to traditional file revision management software like SVN, IBM Synergy etc( which are centralized version control management system), in GIT we've local repository as well as remote repository(Distributed version control management system).
Note: It is important to understand that GIT and GitHub are two different entities. GIT is basically a version control software. Where as GitHub is a platform or server space where we can manage our software with multiple collaborators. GIT can be used without having any GitHub account, but in order to utilize its full potential we may use both GIT with GitHub as remote repository.
To understand in detail you may browse the official documentation,
https://git-scm.com/doc
Step 1: In order to begin with GIT, we need to install GIT from official link below,
https://git-scm.com/
Step 2: Create a GitHub Account
https://github.com/
Step 3: Create a repository on the local machine. Open a folder where you want to create a repository, right click and select 'Git Bash Here',
now a command window shall open. Further operations are based on command interface discussed in step 4.
Step 4:
i. Create a Git repository
$ git init
ii. Add the files in your new local repository. Next step is to push these files onto local repository.
$ git add .
indexes all the files in the current folder.
iii. Commit the files that you've indexed in your local repository.
$ git commit -m "message for the commit. This helps identify on what changes you've committed into the repository".
Now we need to push these files from local repository to remote repository on GitHub.
For this add the URL of the repository that you can find in the GitHub
$ git remote add origin <remote repository URL>
# Sets the new remote url to label 'origin'
$ git remote -v
# Verifies the new remote URL
Push the changes in your local repository to GitHub.
$ git push origin master
Your first set of files are committed to local repository and also pushed onto the remote repository. This can be verified on GitHub as well.
Commonly used GIT commands,
https://github.github.com/training-kit/downloads/github-git-cheat-sheet.pdf
This Blog may contain copyrighted material, the use of which may not have been specifically authorized by the copyright owner. This material is available in an effort for education purpose only.
This should constitute a 'fair use' of any such copyrighted material(referenced and provided for in section 107 of the US Copyright Law).
If you wish to use any copyrighted material from this blog for purposes of your own that go beyond 'fair use', you must obtain expressed permission from the copyright owner.


No comments:
Post a Comment