Professional Documents
Culture Documents
Git Docs
Git Docs
git-sct.com/download
update git if already installed
git update-git-for-windows
check version
git version
intial configuration
user name and email address
either can confirgure globally which you can use for all the repository
or for specific repository also can configure
global configuration
git config --global user.name sumit
git config --global user.email sumit@gmai.com
get cofiguration
git config --global --list
===============================================
create a git repo
- create a directory which work as
workspace
- e:
- mkdir git-workspace
- cd git-workspace (normal directory)
- dir
- git init (normal directory converted into git repository)
- dir -all
- cd .git
- dir
- cd ..
-
===============================================
git - file life cycle
untracked => unchanged => modified => staged
===============================================
implementing life cycle
add command
- moves the files from untracked state to traced state and the staging area
- if files are in tracked stated, then move the changes to the staging area
- Optionally pass the . operator to move all the new / modified / deleted files to
the staging area
git commit
- commit command tracks following
- who made the changes : from profile
- when changes : based on timestamp
- why : user need to pass msg
Ex:
git commit -, "intial commit"
git status
git log
Ex:
git log --oneline and check output
git log --pretty and check output