Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
SlideShare a Scribd company logo
Global Information Tracking   ( Git)  By  Siva Krishna Motamarri
Global Information Tracking   Introduction Advantages Steps to install  msysGit  software  to get  GitHub Repository  Creating Repository Under GitHub Exporting Projects to GitHub Repository Importing Repository from GitHub More Commands Why GIT Why Not SVN?
Introduction Git is a free and open source distributed version control system used as software configuration Management tool.     Version Control System? And what does  it do? 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.
Introduction 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.  Git is a distributed version control system Git does not use a centralized server.  Git runs on Linux, BSD, Solaris, Darwin, Windows, and other operating systems.
Advantages Git is a  free & open source, distributed version control system  designed to handle everything from small to very large projects with speed and efficiency. 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.  Branching and merging are fast  and easy to do. Content-tracking rather than file-tracking Smaller Space Requirement
Steps to install msysGit software  to get GitHub Repository  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
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 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.
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  Finally copy the public key from “id_rsa.pub” file, it should add to your account on github repository.  Now to identify yourself to git:  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]   [note: it should be equal to your email id  at github account].
Steps to install msysGit software for GitHub Repository. This will set the information stored when you commit to a git repo. Now Copy the ssh-rsa key from the path  C:ocuments and Settingsivakrishnassh
Steps to install msysGit software for GitHub Repository.  Before copying ssh-rsa key , You have create one account for your Repository in “http: github.com.
Steps to install msysGit software for GitHub Repository. Click on your Account information on GitHub Repository
Steps to install msysGit software for GitHub Repository. Now Click on “add another public key” under SSH Public Keys.
Creating Repository Under GitHub Click on “dashboard” link under your GitHub account and click on “create a repository”
Creating Repository Under GitHub
Exporting Projects to GitHub Repository  mkdir Creation  cd Creation  git init  touch README  git add README  git commit -m 'first commit'
Exporting Projects to GitHub Repository 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: git remote add origin git@github.com:sivakrishna/Creation.git git push origin master
Exporting Projects to GitHub Repository
Importing Repository from GitHub Now we get the repository back to your system , by the following command. Git clone repo_url  Ex: git clone  git://github.com/sivakrishna/Creation.git
More Commands TO SCHEDULE THE ADDITION OF ALL FILES TO THE NEXT COMMIT git add . TO SEE THE STATUS git status  TO COMMIT git commit -m “First import”  TO SEE WHAT HAS BEEN COMMITTED git ls-files  TO SCHEDULE DELETION OF A FILE git rm [file name]  TO COMMIT ALL CHANGES IN FILES IN THE CURRENT REPOSITORY git commit -a
More Commands TO VIEW THE DIFFERENCE AS YOU COMMIT USE THE -v OPTION git commit -v  TO VIEW A LOG OF YOUR COMMITS git log  TO VIEW A LOG OF YOUR COMMITS WITH A GRAPH TO SHOW THE EXTENT OF THE CHANGES git log —stat  TO HAVE PAGINATION WHEN VIEWING THE LOG FILE USE THE -v OPTION git log -v
More Commands TO CREATE A NEW BRANCH git branch [name of your new branch]  TO PUSH THE NEW BRANCH TO A REMOTE REPOSITORY git push origin [new-remote]  TO PULL A NEW BRANCH FROM A REMOTE REPOSITORY git fetch origin [remote-branch]:[new-local-branch]  TO VIEW ALL OF THE EXISTING BRANCHES git branch  TO VIEW A LIST OF ALL BRANCHES git branch -a
Why Git Why Not SVN? Security 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. Speed 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. 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.
Why Git Why Not SVN? Smaller Space Requirement 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.  Key’s for Branches 1. Creating branches in Git is a lot easier than doing this in SVN. 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. 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.
? Queries
Thank You  Siva Krishna . M

More Related Content

GIT By Sivakrishna

  • 1. Global Information Tracking ( Git) By Siva Krishna Motamarri
  • 2. Global Information Tracking Introduction Advantages Steps to install msysGit software to get GitHub Repository Creating Repository Under GitHub Exporting Projects to GitHub Repository Importing Repository from GitHub More Commands Why GIT Why Not SVN?
  • 3. Introduction Git is a free and open source distributed version control system used as software configuration Management tool.   Version Control System? And what does it do? 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.
  • 4. Introduction 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. Git is a distributed version control system Git does not use a centralized server. Git runs on Linux, BSD, Solaris, Darwin, Windows, and other operating systems.
  • 5. Advantages Git is a free & open source, distributed version control system designed to handle everything from small to very large projects with speed and efficiency. 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. Branching and merging are fast and easy to do. Content-tracking rather than file-tracking Smaller Space Requirement
  • 6. Steps to install msysGit software to get GitHub Repository 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
  • 7. Steps to install msysGit software to get GitHub Repository
  • 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. Steps to install msysGit software to get GitHub Repository
  • 10. Steps to install msysGit software to get GitHub Repository
  • 11. Steps to install msysGit software to get GitHub Repository Finally copy the public key from “id_rsa.pub” file, it should add to your account on github repository. Now to identify yourself to git: 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] [note: it should be equal to your email id at github account].
  • 12. Steps to install msysGit software for GitHub Repository. This will set the information stored when you commit to a git repo. Now Copy the ssh-rsa key from the path C:ocuments and Settingsivakrishnassh
  • 13. Steps to install msysGit software for GitHub Repository. Before copying ssh-rsa key , You have create one account for your Repository in “http: github.com.
  • 14. Steps to install msysGit software for GitHub Repository. Click on your Account information on GitHub Repository
  • 15. Steps to install msysGit software for GitHub Repository. Now Click on “add another public key” under SSH Public Keys.
  • 16. Creating Repository Under GitHub Click on “dashboard” link under your GitHub account and click on “create a repository”
  • 18. Exporting Projects to GitHub Repository mkdir Creation cd Creation git init touch README git add README git commit -m 'first commit'
  • 19. Exporting Projects to GitHub Repository 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: git remote add origin git@github.com:sivakrishna/Creation.git git push origin master
  • 20. Exporting Projects to GitHub Repository
  • 21. Importing Repository from GitHub Now we get the repository back to your system , by the following command. Git clone repo_url Ex: git clone git://github.com/sivakrishna/Creation.git
  • 22. More Commands TO SCHEDULE THE ADDITION OF ALL FILES TO THE NEXT COMMIT git add . TO SEE THE STATUS git status TO COMMIT git commit -m “First import” TO SEE WHAT HAS BEEN COMMITTED git ls-files TO SCHEDULE DELETION OF A FILE git rm [file name] TO COMMIT ALL CHANGES IN FILES IN THE CURRENT REPOSITORY git commit -a
  • 23. More Commands TO VIEW THE DIFFERENCE AS YOU COMMIT USE THE -v OPTION git commit -v TO VIEW A LOG OF YOUR COMMITS git log TO VIEW A LOG OF YOUR COMMITS WITH A GRAPH TO SHOW THE EXTENT OF THE CHANGES git log —stat TO HAVE PAGINATION WHEN VIEWING THE LOG FILE USE THE -v OPTION git log -v
  • 24. More Commands TO CREATE A NEW BRANCH git branch [name of your new branch] TO PUSH THE NEW BRANCH TO A REMOTE REPOSITORY git push origin [new-remote] TO PULL A NEW BRANCH FROM A REMOTE REPOSITORY git fetch origin [remote-branch]:[new-local-branch] TO VIEW ALL OF THE EXISTING BRANCHES git branch TO VIEW A LIST OF ALL BRANCHES git branch -a
  • 25. Why Git Why Not SVN? Security 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. Speed 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. 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.
  • 26. Why Git Why Not SVN? Smaller Space Requirement 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. Key’s for Branches 1. Creating branches in Git is a lot easier than doing this in SVN. 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. 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.
  • 28. Thank You Siva Krishna . M