Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

git fast & minimal

488 views

Published on

fast, quick and minimal GIT for noobs

Published in: Technology
  • Be the first to comment

  • Be the first to like this

git fast & minimal

  1. 1. GitGitParuthi{.exe}Paruthi{.exe}
  2. 2. InfoInfoIf u r here then u mightIf u r here then u mightalready know “what isalready know “what isGIT” am I right ?GIT” am I right ?This is a fast git tutorialThis is a fast git tutorial,,no deep stuffs...no deep stuffs...
  3. 3. SowhatisGITSowhatisGIT is a distributed revisioncontrol and source codemanagement (SCM)system with an emphasison speed.Time to move to thefastest distribute sourcecontrol.
  4. 4. WhomadethisWhomadethis Initially designed anddeveloped by Linus Torvalds for Linuxkernel developmentCurrent License : GPLv2: GPLv2 open source license
  5. 5. FeaturesFeaturesBranching and MergingBranching and MergingSmall and FastSmall and FastDistributedDistributedData AssuranceData AssuranceStaging AreaStaging AreaFree and Open SourceFree and Open Source
  6. 6. CreateanewCreateanewrepositoryrepository[ git init ] – command[ git init ] – commandwill create a newwill create a newrepository(workingrepository(workingcopy)copy)[ git init --bare ] :[ git init --bare ] :command will create thecommand will create theserver side of theserver side of therepository (this is whererepository (this is wherewe save our changes)we save our changes)
  7. 7. gitglobalgitglobalconfigurationconfigurationgit config --globaluser.name “user name"git config --globaluser.email“name@mail.com"git config –globalcolor.ui "auto“
  8. 8. Clone/CheckoutClone/CheckoutfromarepositoryfromarepositoryLocal :-Local :-[ git clone[ git clone/path_of_src_repository/path_of_src_repository] : command creates a] : command creates aworking copy of a localworking copy of a localrepositoryrepository
  9. 9. Clone/CheckoutClone/CheckoutfromarepositoryfromarepositoryServer :-Server :-[ git clone[ git cloneusername@host:/path_ousername@host:/path_of_repository ] : commandf_repository ] : commandcreates a working copycreates a working copyof a repository fromof a repository fromserverserver
  10. 10. AddfilestogitAddfilestogit[git add filename ]:[git add filename ]:command adds thecommand adds thefilenamefilename[git add *] : command[git add *] : commandadds all the files in theadds all the files in thefolderfolder[git add *.py] :[git add *.py] :command adds all thecommand adds all thefiles with “.py” extentionfiles with “.py” extentionin the folderin the folder
  11. 11. GetcurrentstatusGetcurrentstatus[git status] : command[git status] : commandgives the current statusgives the current statusof files. Added, staged,of files. Added, staged,untracked, modifieduntracked, modifiedfiles…files…
  12. 12. CommittheCommitthechangeschangesIt is time to save theIt is time to save thechanges to the gitchanges to the git[git commit –m[git commit –m“comments about the“comments about thecurrent code changes”] :current code changes”] :command will save thecommand will save thechanges.changes.
  13. 13. PushtotheserverPushtotheserver[git push <remote[git push <remotename> <branchname> <branchname>] : command willname>] : command willpush the code in thepush the code in thelocal folder to thelocal folder to theserver.server.
  14. 14. PullthechangesPullthechanges[[git pull <remotename><branchname>] :] :command will updatecommand will updatethe local code andthe local code andmerge with the newmerge with the newcode from the server.code from the server.
  15. 15. Sourcecodehostingfor.git Following Web sites providerepositories[info from wikiinfo from wiki]: GitHub ; Assembla ;Bitbucket CloudForge ;CollabNet ; Gitorious ;GNU Savannah ;Google Code ; JavaForge;SourceForge ; BerliOS ;CodePlex Choose based on yourChoose based on yourrequirement.requirement. I have tried only GitHub,I have tried only GitHub,Bitbucket and assembla allBitbucket and assembla allare good.are good.

×