• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Git ritesh venture_pact
 

Git ritesh venture_pact

on

  • 196 views

How git works

How git works

Statistics

Views

Total Views
196
Views on SlideShare
196
Embed Views
0

Actions

Likes
0
Downloads
0
Comments
0

0 Embeds 0

No embeds

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 ritesh venture_pact Git ritesh venture_pact Presentation Transcript

    • What is Git? • Source Code Management (SCM) Tool. • Version Control System (VCS) Tool. • Keeps Track Of Changes. • Versions Can Be Shared Between Multiple Users. • Open Source.
    • How Git Works? • Takes Snapshot Of The Changes Done. • Each Change Updated Is Stored As Snapshot. • Can Retrieve The Snapshot Created Previously. • Multiple Persons Can Work And Update Files In The Same Repository At The Same Time.
    • Key Terms Before Installation • Repository • Branch • Branch Header • Branch Merging • Push and Pull
    • How To Install And Configure Git • Go To http://git-scm.com/download For Command Based Git. • Go To http://git-scm.com/downloads/guis for GUI Based Git Control. • After installation, Set The PATH Environment variable to C:Program Files (x86)Gitbin
    • Create Repository On Git • Go to https://github.com/ and Signup • A Repository is a virtual name which keeps your project and changes made to the files. Create a new Repository by clicking on “New repository” button on the home page after signup up or logging in. • Check the option ” Initialize this repository with a README”
    • Repository Operations • The default branch name for the Repository is “master” branch. • Create a directory with name “gittest”. You can use DOS command ‘md gittest’. • To move into the directory give command ‘cd gittest’. • To create a git repository on the local server(your machine) type the command ‘git init .’ This creates a new subdirectory named .git that contains all of your necessary repository files — a Git repository skeleton.
    • Repository Operations • Now get the existing project name from github.com into your local server repository. The command is ‘git clone --recursive git@github.com:riteshtandon23/gittest’ (i.e. The SSH Path) • Recursive is used so that any changes made to the branches are also added in the current local repository. Use ‘git pull’ to get all files. • Incase facing error of unauthorized access or permission denied you need to generate a new pass key ‘ssh-keygen -t rsa -C username@domain.com’
    • Repository Operations • Now add some files inside your new directory created under the folder ‘gittest’. • This command would create a snapshot of the current directory structure and files. Command ‘git add .’ • This commands tells that the snapshot is ready to be committed from local to remote origin. Command ‘git commit -m "First commit”’ • Give command ‘git push origin master’. This would push the snapshot to the remote origin.
    • Branches • A branch is created when we want to change some code from a stabilized version. • To create a branch, The command is ‘git branch "branchname“’ • Also create the same branch on Github website. • To list all branches, The command is ‘git branch’. • Now, Create a branch on Github.com interface. with the name ‘ritesh’.
    • Branches • Now, Create a new folder in the main directory with name of the branch, this would actually map with the branch created on the origin.The command is ‘md ritesh’. • Now move into the directory having the branch name. i.e. ‘cd ritesh’ ’. and give the command ‘git clone -b ritesh --recursive SSH_PATH_Of_Repository’ • Now add some files into the local directory.
    • Branches • To create a snapshot the command is ‘git add .’ • To prepare for commit give command ‘git commit –am “Branch Commit”’ • To push the updated snapshot, Give the command ‘git push origin ritesh’ • Now move into the folder inside the branch folder(ritesh), This can be done by ‘cd TestWebsite’.
    • Moving On To The Previous Versions • To move on to the previous versions, We need to check the previous commits done by the user. • You can find this on the “Commits” link on the home page of the Github page. • On the Commits page there is list of commits the user has done in the past. To move on to the previous version copy the SSH code on the right side of the commit. • Give the command ‘git reset --hard SSHCode’ • Give comamnd ‘git pull’ to update local folder.