Posts

Showing posts with the label Git Cheat Sheet

Git Cheat Sheet

Image
1. Git configuration Git config Get and set configuration variables that control all facets of how Git looks and operates. Set the name: $ git config --global user.name "User name" Set the email: $ git config --global user.email "himanshudubey481@gmail.com" Set the default editor: $ git config --global core.editor Vim Check the setting: $ git config -list Git alias Set up an alias  for each command: $ git config --global alias.co checkout $ git config --global alias.br branch $ git config --global alias.ci commit $ git config --global alias.st status 2. Starting a project Git init Create a local repository: $ git init Git clone Make a local copy  of the server repository. $ git clone 3. Local changes Git add Add a file  to staging (Index) area: $ git add Filename Add all files  of a repo to staging (Index) area: $ git add* Git commit Record  or snapshots the file permanently in the version history  with a message . $ git commit -m " Commit Message" 4. Trac...