Git demo for beginners-Learning path to evolve

chinnaraokandi3 4 views 29 slides Jun 26, 2024
Slide 1
Slide 1 of 29
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13
Slide 14
14
Slide 15
15
Slide 16
16
Slide 17
17
Slide 18
18
Slide 19
19
Slide 20
20
Slide 21
21
Slide 22
22
Slide 23
23
Slide 24
24
Slide 25
25
Slide 26
26
Slide 27
27
Slide 28
28
Slide 29
29

About This Presentation

Git demo for beginners


Slide Content

GITHUB DEMO 27 Mar 2024

Executive Summary AGENDA Git fundamentals Git clients Git setup Git commands Working with people Git conflicts /merging Current Project Development JSW

git git is an open source, distributed version control system designed for speed and efficiency

git git is an open source, distributed version control system designed for speed and efficiency

git git is an open source, distributed version control system designed for speed and efficiency

git git is an open source, distributed version control system designed for speed and efficiency (almost) everything is local

No Network needed for (almost) everything is local Performing a diff Viewing file history Committing changes Merging branches Obtaining any other revision of a file Switching branches

git git is an open source , distributed version control system designed for speed and efficiency http://bit.ly/git-linus-intro http://bit.ly/git-advantages More Advantages

installing git http://git-scm.com/downloads

getting setup ... $ git config --global user.name “<YOUR_NAME>” $ git config --global user.email “<YOUR_EMAIL>” or edit them in ~/.gitconfig

lets dive in.. gitref.org/ Creating New Repo Committing Branching/Merging InspectionCloning a RepoUpdating

lets dive in.. Creating New Repo Committing Branching/Merging Inspection Cloning a Repo Updating http://git-scm.com/docs

Git Commands $ git init $ ls -al $ git init $ ls -al $ mkdir workspace $ cd workspace Initialized empty Git repository in ../workspace/.git/ drwxr-xr-x 10 Shreyas staff 340 Jan 15 17:22 .git Creating New Repo Committing Branching/Merging Inspection Cloning a Repo Updating

Git Commands Creating New Repo Committing Branching/Merging Inspection Cloning a Repo Updating $ cd .git $ tree -a

Git Commands $ git status Creating New Repo Committing Branching/Merging Inspection Cloning a Repo Updating $ cd .. $ touch testfile.md branch name staging area

Git Commands $ git add <filename> Creating New Repo Committing Branching/Merging Inspection Cloning a Repo Updating staging area $ git status

Git Commands $ git commit Creating New Repo Committing Branching/Merging Inspection Cloning a Repo Updating your commit msg $ git status

Git Commands $ git reset Creating New Repo Committing Branching/Merging Inspection Cloning a Repo Updating (undo add) changes staged changes unstaged

Git Commands $ git reset --soft HEAD^ Creating New Repo Committing Branching/Merging Updating Inspection Cloning A Repo (undo a commit and redo) $ git reset --hard HEAD~3 Rewind the branch to get rid of last three commits http://git-scm.com/docs/git-reset http://git-scm.com/docs/git-revert.html learn more here : also refer git revert : http://git-scm.com/docs/git-stash git stash :

Git Commands $ git rm <filename> Creating New Repo Committing Branching/Merging Inspection Cloning a Repo Updating remove a file from the repo as expected, you will need to commit the change $ git mv <filename> move/rename a file from the repo as expected, you will need to commit the change

Git Commands $ git branch Creating New Repo Committing Branching/Merging Inspection Cloning a Repo Updating list of branches $ git branch <branchname> new branch $ git checkout <branchname> switch

Git Commands Creating New Repo Committing Branching/Merging Inspection Cloning a Repo Updating new branch dev switch branch branch list

Git Commands Creating New Repo Committing Branching/Merging Inspection Cloning a Repo Updating $ git merge <branchname> merge branches branch merge

Git Commands Creating New Repo Committing Branching/Merging Inspection Cloning a Repo Updating $ git log --graph --decorate --abbrev-commit --all --pretty=oneline text-based graph :)

Git Commands Creating New Repo Committing Branching/Merging Inspection Cloning a Repo Updating ~/.gitconfig [alias] l = log --pretty=oneline -n 20 --graph

Git Commands Creating New Repo Committing Branching/Merging Inspection Cloning a Repo Updating $ gitk

GitHub Creating New Repo Committing Branching/Merging Inspection Cloning a Repo Updating $ git pull $ git push = git fetch + git merge

GitHub Creating New Repo Committing Branching/Merging Inspection Cloning a Repo Updating GitHub Pull Request
Tags