Last active
February 1, 2018 18:33
-
-
Save ManiruzzamanAkash/0a26477f94701d39c83a420cf7e69d7b to your computer and use it in GitHub Desktop.
All the git command list from start to bottom as html file
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
---------------------------------------------------------------------------- | |
#Configure Git(First Time Git Bash Setup) | |
git config user.email "my@emailaddress.com" | |
git config user.name "UserName" | |
---------------------------------------------------------------------------- | |
#Start git after onclick folder | |
git init | |
---------------------------------------------------------------------------- | |
#See git status to check what is the changes | |
git status | |
---------------------------------------------------------------------------- | |
#Add All files to git | |
git add . | |
---------------------------------------------------------------------------- | |
#Git Commit before pushing anything | |
git commit -m "This is my commit message" | |
---------------------------------------------------------------------------- | |
#Git Changes | |
git log | |
---------------------------------------------------------------------------- | |
#Add a remote repository in Github | |
git remote add origin https://github.com/try-git/try_git.git | |
---------------------------------------------------------------------------- | |
#Push Into Origin>master and save master next time by -u | |
git push -u origin master | |
#Next time | |
git push | |
---------------------------------------------------------------------------- | |
#Create Branch and move to that branch | |
git checkout -b BranchName | |
#Or just create Branch | |
git branch BranchName | |
#Then switch to that branch | |
git checkout BranchName | |
#After completing this branch work switch to master | |
git checkout master | |
---------------------------------------------------------------------------- | |
#Push Folder/Files in branch | |
git push https://github.com/RepositoryAddress BranchName | |
---------------------------------------------------------------------------- | |
#Pull Folder/Files from repository | |
git pull | |
---------------------------------------------------------------------------- | |
#Remove Branch | |
git push https://github.com/RepositoryAddress :BranchName | |
git branch -d BranchName | |
---------------------------------------------------------------------------- | |
#Get back the last commit for any file | |
git checkout -- file_name.txt | |
---------------------------------------------------------------------------- | |
#Remove all text file and stages | |
git rm '*.txt' | |
---------------------------------------------------------------------------- | |
#Merge with branch and master | |
git checkout master | |
git merge BranchName | |
---------------------------------------------------------------------------- | |
#Clone repository into local repository | |
git clone https://github.com/RepositoryURL | |
---------------------------------------------------------------------------- | |
#Creating Tag -a means add >> -m means message of that tag | |
git tag -a TagName -m "my version 1.4" | |
#Show that tag | |
git show TagName | |
---------------------------------------------------------------------------- | |
###Thanks for seeing - From Maniruzzaman Akash### |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment