Previous Git Blogs
1. Intialize git repostiory
2. First Commit
3. Two tree architecture and Three tree architecture
4. Best basic practices for writing commit messages
5. Viewing the commit logs
6. Git Basic WorkFlow
7. What is HEAD pointer in GIT
8. Git Configuration
9. Viewing history
10. Updating a file and adding it to repository
11. Viewing history
Lets Summarise what we have done till now
Created a local repository
Configure the config file
Added Files
Added only updated files
Check the Status
View the history
view the diff
Initializing a git repository
git init
git status
Setting Configuration
git config --global user.name
git config --global user.email
git config --global core.editor gedit
git config --global help.autocorrect 1
git config --global color.ui auto
git config --global core.autocrlf ture|false|input
git config --global --list
cat .git/config
git config --unset core.autocrlf
ADD, COMMIT
git status
gedit readme.txt //New file
git status
git add
git staus
git commit
git log
gedit readme.txt //Update file
git stauts
git add -U //stage only updated files
git commit -m"message"
View history and diff
git log
git diff dd
git diff e95efc..34d195
git diff HEAD~1..HEAD
touch file1.txt file2.txt //adding files
git status
git add -U //Only stage updtaed files
git status
git add file1.txt //Only stage file1.txt
git status
git commit -m"message"
git status
git diff HEAD~1..HEAD
0 Comment(s)