• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Git basic
 

Git basic

on

  • 1,431 views

In this presentation I try to give the basic concepts and commands about Git. By which anyone can start versioning and Enjoy the Git.

In this presentation I try to give the basic concepts and commands about Git. By which anyone can start versioning and Enjoy the Git.

Statistics

Views

Total Views
1,431
Views on SlideShare
1,263
Embed Views
168

Actions

Likes
1
Downloads
34
Comments
0

1 Embed 168

http://emranulhadi.wordpress.com 168

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Git basic Git basic Presentation Transcript

    • Git BasicsMd. Emran Ul HadiSoftware Engineer WNeeds Ltd
    •             What well cover• Concept of Version control system• Concept of Git• Some basic commands
    •             Version controlMost used Concurrent version system(CVS) andSubversion(SVN).Key concepts: • Central source control system • users check code into server • requires connection to the server to perform commits, updates etc.        
    •                     Git ???????• Distributed Version Control System•  Like sub-version but better...• Created by Linus Torvald
    •             WHY Git??????   Distributed repository • Self contained • Full history of commit •  You can commit/branch/merge locally • Read fast and offline •  No "latest revision": revision unique ID
    •                     Get Started
    •                 Git Started            getting started • move to a directory with code you’d like to manage with git: # git init • you’ve now created your first git repository! For remote repository access: # git clone remote_git_repository_url Example: # git clone git@github.com:mobbazaar/api
    •                     Work Flow  
    •                      Useful basics commands     git init ‣ repository setup  git add ‣ add files to queue for next commit  git commit ‣ commit queued files  git push ‣ push commit(s) to remote repository  git pull ‣ fetch changes from remote repository  git clone ‣ clone repository into a local directory   .gitignore ‣ ignore specific files by adding them here
    •                 Continue...git status ‣ Show uncommited changesgit rm  ‣ Remove a file from a repositorygit mv ‣ Move a file within repositorygit diff ‣ Generate a differences between     multiple commitsgit log ‣ View a log of commits
    •                     Git Level    
    •                     Branches
    •                    Branchinggit branch new_branch  create new branchgit branch -b feature2 create new branch and switch to that branchgit commit save some workgit checkout master  switch backgit merge feature2 work is merged ingit rebase feature2 work played on topgit branch -d feature2 delete branch
    •             tagging and merginggit merge branch_name Merge changes from branch_name to the current branchgit tag -a name Add a tag with a indicated namegit tag -l List tagsgit push --tags Push tags to remote repository
    •      Handling Some critical situation • Changing your last commit             #  git commit --amend      • Unstaging a staged File                # git reset HEAD FILE_NAME • Unmodifying a modified File              # git checkout -- FILE_NAME
    •           Some rules have to follow• NEVER pull when you have uncommitted changes - commit your work first.• First PULL then PUSH• If working on a feature, use a local branch, then this leaves the master open for other fixes.        
    • Lets Discuss
    •                  Resources• http://gitref.org                   [For basics commands]• http://progit.org/book/• http://www.slideshare.net/search/slideshow? searchfrom=header&q=git