0
<ul><li>Global Information Tracking   </li></ul><ul><li>( Git)  </li></ul><ul><li>By  </li></ul><ul><li>Siva Krishna Motam...
Global Information Tracking   <ul><li>Introduction </li></ul><ul><li>Advantages </li></ul><ul><li>Steps to install  msysGi...
Introduction <ul><li>Git is a free and open source distributed version control system used as software configuration Manag...
Introduction <ul><li>Version control system consists of repository, where all files resides at one place. A repository wor...
Advantages <ul><li>Git is a  free & open source, distributed version control system  designed to handle everything from sm...
Steps to install msysGit software  to get GitHub Repository  <ul><li>1. To upload your projects to your GitHub Repository,...
Steps to install msysGit software  to get GitHub Repository
Steps to install msysGit software  to get GitHub Repository  Then Create a SSH Key , at least one SSH Key is required to u...
Steps to install msysGit software  to get GitHub Repository
Steps to install msysGit software  to get GitHub Repository
Steps to install msysGit software  to get GitHub Repository  <ul><li>Finally copy the public key from “id_rsa.pub” file, i...
Steps to install msysGit software for GitHub Repository. <ul><li>This will set the information stored when you commit to a...
Steps to install msysGit software for GitHub Repository.  <ul><li>Before copying ssh-rsa key , You have create one account...
Steps to install msysGit software for GitHub Repository. <ul><li>Click on your Account information on GitHub Repository  <...
Steps to install msysGit software for GitHub Repository. <ul><li>Now Click on “add another public key” under SSH Public Ke...
Creating Repository Under GitHub <ul><li>Click on “dashboard” link under your GitHub account and click on “create a reposi...
Creating Repository Under GitHub
Exporting Projects to GitHub Repository  <ul><li>mkdir Creation  </li></ul><ul><li>cd Creation  </li></ul><ul><li>git init...
Exporting Projects to GitHub Repository <ul><li>Now you can push the contents of your Rails directory to the empty git rep...
Exporting Projects to GitHub Repository
Importing Repository from GitHub <ul><li>Now we get the repository back to your system , by the following command. </li></...
More Commands <ul><li>TO SCHEDULE THE ADDITION OF ALL FILES TO THE NEXT COMMIT </li></ul><ul><ul><ul><li>git add . </li></...
More Commands <ul><li>TO VIEW THE DIFFERENCE AS YOU COMMIT USE THE -v OPTION </li></ul><ul><ul><ul><li>git commit -v  </li...
More Commands <ul><li>TO CREATE A NEW BRANCH </li></ul><ul><ul><ul><li>git branch [name of your new branch]  </li></ul></u...
Why Git Why Not SVN? <ul><li>Security </li></ul><ul><li>The key difference between the two systems seems to be the model i...
Why Git Why Not SVN? <ul><li>Smaller Space Requirement </li></ul><ul><li>A Subversion working directory contains two copie...
? Queries
<ul><li>Thank You  </li></ul><ul><li>Siva Krishna . M </li></ul>
Upcoming SlideShare
Loading in...5
×

GIT By Sivakrishna

1,947

Published on

Seminar Presentation on GIT by Siva Krishna at Nyros Technologies, Kakinada on 16 May, 2009.

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
1,947
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
32
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Transcript of "GIT By Sivakrishna"

  1. 1. <ul><li>Global Information Tracking </li></ul><ul><li>( Git) </li></ul><ul><li>By </li></ul><ul><li>Siva Krishna Motamarri </li></ul>
  2. 2. Global Information Tracking <ul><li>Introduction </li></ul><ul><li>Advantages </li></ul><ul><li>Steps to install msysGit software to get GitHub Repository </li></ul><ul><li>Creating Repository Under GitHub </li></ul><ul><li>Exporting Projects to GitHub Repository </li></ul><ul><li>Importing Repository from GitHub </li></ul><ul><li>More Commands </li></ul><ul><li>Why GIT Why Not SVN? </li></ul>
  3. 3. Introduction <ul><li>Git is a free and open source distributed version control system used as software configuration Management tool.   </li></ul><ul><li>Version Control System? And what does it do? </li></ul><ul><li>Version Control System: The name itself means controlling of code i.e. source code management which allows programmers to easily share the code of their work with other programmers. By this feature developers can develop different feature on the same code by keeping track of all old versions. </li></ul>
  4. 4. Introduction <ul><li>Version control system consists of repository, where all files resides at one place. A repository works like a database, which stores each version(history of changes for any file) as a record. Then repository users can ‘checkout’ working copy. After making required changes then ‘commit’ changes back to repository, which can create new version (about the files and person who changed it). By this way developers can pull and push changes to repository in the developed of a web product. This mechanism or procedure is the process of version control system. </li></ul><ul><li>Git is a distributed version control system </li></ul><ul><li>Git does not use a centralized server. </li></ul><ul><li>Git runs on Linux, BSD, Solaris, Darwin, Windows, and other operating systems. </li></ul>
  5. 5. Advantages <ul><li>Git is a free & open source, distributed version control system designed to handle everything from small to very large projects with speed and efficiency. </li></ul><ul><li>Every Git clone is a full-fledged repository with complete history and full revision tracking capabilities, not dependent on network access or a central server. </li></ul><ul><li>Branching and merging are fast and easy to do. </li></ul><ul><li>Content-tracking rather than file-tracking </li></ul><ul><li>Smaller Space Requirement </li></ul>
  6. 6. Steps to install msysGit software to get GitHub Repository <ul><li>1. To upload your projects to your GitHub Repository, You have to install latest version Git-version.exe from www.code.google.com/p/msysgit/downloads/list and double clicking the download. 2. Run Git Bash program to get Git command prompt </li></ul>
  7. 7. Steps to install msysGit software to get GitHub Repository
  8. 8. Steps to install msysGit software to get GitHub Repository Then Create a SSH Key , at least one SSH Key is required to upload your project from Your System to Git Hub repository. So create one SSH key for your system by using the below command in github command prompt.
  9. 9. Steps to install msysGit software to get GitHub Repository
  10. 10. Steps to install msysGit software to get GitHub Repository
  11. 11. Steps to install msysGit software to get GitHub Repository <ul><li>Finally copy the public key from “id_rsa.pub” file, it should add to your account on github repository. </li></ul><ul><li>Now to identify yourself to git: </li></ul><ul><li>Go to git bash shell command prompt and type following commands $ git config –global user.name “Your Name Here” $ git config –global user.email [email_address] </li></ul><ul><li>[note: it should be equal to your email id </li></ul><ul><li>at github account]. </li></ul>
  12. 12. Steps to install msysGit software for GitHub Repository. <ul><li>This will set the information stored when you commit to a git repo. </li></ul><ul><li>Now Copy the ssh-rsa key from the path C:Documents and Settingssivakrishna.ssh </li></ul>
  13. 13. Steps to install msysGit software for GitHub Repository. <ul><li>Before copying ssh-rsa key , You have create one account for your Repository in “http:github.com”. </li></ul>
  14. 14. Steps to install msysGit software for GitHub Repository. <ul><li>Click on your Account information on GitHub Repository </li></ul>
  15. 15. Steps to install msysGit software for GitHub Repository. <ul><li>Now Click on “add another public key” under SSH Public Keys. </li></ul>
  16. 16. Creating Repository Under GitHub <ul><li>Click on “dashboard” link under your GitHub account and click on “create a repository” </li></ul>
  17. 17. Creating Repository Under GitHub
  18. 18. Exporting Projects to GitHub Repository <ul><li>mkdir Creation </li></ul><ul><li>cd Creation </li></ul><ul><li>git init </li></ul><ul><li>touch README </li></ul><ul><li>git add README </li></ul><ul><li>git commit -m 'first commit' </li></ul>
  19. 19. Exporting Projects to GitHub Repository <ul><li>Now you can push the contents of your Rails directory to the empty git repository that we created on Github in the previous step by running the following command in Git Bash shell: </li></ul><ul><li>git remote add origin git@github.com:sivakrishna/Creation.git </li></ul><ul><li>git push origin master </li></ul>
  20. 20. Exporting Projects to GitHub Repository
  21. 21. Importing Repository from GitHub <ul><li>Now we get the repository back to your system , by the following command. </li></ul><ul><li>Git clone repo_url </li></ul><ul><li>Ex: git clone git://github.com/sivakrishna/Creation.git </li></ul>
  22. 22. More Commands <ul><li>TO SCHEDULE THE ADDITION OF ALL FILES TO THE NEXT COMMIT </li></ul><ul><ul><ul><li>git add . </li></ul></ul></ul><ul><li>TO SEE THE STATUS </li></ul><ul><ul><ul><li>git status </li></ul></ul></ul><ul><li>TO COMMIT </li></ul><ul><ul><ul><li>git commit -m “First import” </li></ul></ul></ul><ul><li>TO SEE WHAT HAS BEEN COMMITTED </li></ul><ul><ul><ul><li>git ls-files </li></ul></ul></ul><ul><li>TO SCHEDULE DELETION OF A FILE </li></ul><ul><ul><ul><li>git rm [file name] </li></ul></ul></ul><ul><li>TO COMMIT ALL CHANGES IN FILES IN THE CURRENT REPOSITORY </li></ul><ul><ul><ul><li>git commit -a </li></ul></ul></ul>
  23. 23. More Commands <ul><li>TO VIEW THE DIFFERENCE AS YOU COMMIT USE THE -v OPTION </li></ul><ul><ul><ul><li>git commit -v </li></ul></ul></ul><ul><li>TO VIEW A LOG OF YOUR COMMITS </li></ul><ul><ul><ul><li>git log </li></ul></ul></ul><ul><li>TO VIEW A LOG OF YOUR COMMITS WITH A GRAPH TO SHOW THE EXTENT OF THE CHANGES </li></ul><ul><ul><ul><li>git log —stat </li></ul></ul></ul><ul><li>TO HAVE PAGINATION WHEN VIEWING THE LOG FILE USE THE -v OPTION </li></ul><ul><ul><ul><li>git log -v </li></ul></ul></ul>
  24. 24. More Commands <ul><li>TO CREATE A NEW BRANCH </li></ul><ul><ul><ul><li>git branch [name of your new branch] </li></ul></ul></ul><ul><li>TO PUSH THE NEW BRANCH TO A REMOTE REPOSITORY </li></ul><ul><ul><ul><li>git push origin [new-remote] </li></ul></ul></ul><ul><li>TO PULL A NEW BRANCH FROM A REMOTE REPOSITORY </li></ul><ul><ul><ul><li>git fetch origin [remote-branch]:[new-local-branch] </li></ul></ul></ul><ul><li>TO VIEW ALL OF THE EXISTING BRANCHES </li></ul><ul><ul><ul><li>git branch </li></ul></ul></ul><ul><li>TO VIEW A LIST OF ALL BRANCHES </li></ul><ul><ul><ul><li>git branch -a </li></ul></ul></ul>
  25. 25. Why Git Why Not SVN? <ul><li>Security </li></ul><ul><li>The key difference between the two systems seems to be the model itself. Where Subversion offers a centralized model, Git provides a decentralized model. At the risk of over simplification, this means that Git offers each developer their very own, fully autonomous copy of the entire repository. With Subversion, each developer has their own working copy, but commits changes to a single, central repository. </li></ul><ul><li>Speed </li></ul><ul><li>Since each developer has a local copy of the entire repository, fundamental actions like diff, commit, etc. are all local. That’s always going to be faster. Fast is good. </li></ul><ul><li>That said, server interaction with Subversion isn’t exactly excessive. Developers work in local working directories and only interact with the server in short time. </li></ul>
  26. 26. Why Git Why Not SVN? <ul><li>Smaller Space Requirement </li></ul><ul><li>A Subversion working directory contains two copies of the entire code base. One that is actually being worked on and another tucked away in the .svn directory. Repository required ~12Gb of storage in Subversion and ~420Mb in Git. </li></ul><ul><li>Key’s for Branches </li></ul><ul><li>1. Creating branches in Git is a lot easier than doing this in SVN. </li></ul><ul><li>2. When merging the branch back, SVN didn’t know where that branch started. Git keeps track where branches come from. So when creating a branch, merging back is very simple. </li></ul><ul><li>3. When merging the branch back, each change was recorded back as the user who did the merge By the Git where as SVN doesn’t. Git keeps commit messages intact, when merging. </li></ul>
  27. 27. ? Queries
  28. 28. <ul><li>Thank You </li></ul><ul><li>Siva Krishna . M </li></ul>
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×