# GitHub

Github command for DevOps engineer:  
  
✅ sets email address respectively to be used with your commits: git config --global user. email "youremail@example. com"  
  
✅ sets the author name: git config --global user. name "FirstName LastName"  
  
✅ command is used to start a new repository: git init  
  
✅ command lists all the files that have to be committed: git status  
  
✅ command adds all files under the current directory to the staging area: git add .  
  
✅ command records or snapshots the file permanently in the version history: git commit -m "Add three files"  
  
✅ command allows you to change the commit message: git commit --amend -m&lt;enter your message&gt;  
  
✅ command lists all the local branches in the current repository: git branch  
  
✅ command creates a new branch : git branch &lt;branch\_name&gt;  
  
✅ command is used to switch from one branch to another: git checkout &lt;br -  
anch-name&gt;  
  
✅ command creates a new branch and also switches to it : git checkout -b &lt;branch-name&gt;  
  
✅ command is used to connect your local repository to the remote server: git remote add origin &lt;link-to-rep‐o&gt;  
  
✅ command sends the committed changes of main branch to your remote repository: git push -u origin master  
  
✅ command is used to obtain a repository from an existing URL: git clone &lt;link-to-‐clone-repo&gt;  
  
✅ command fetches and merges changes on the remote server to your working directory: git pull  
  
✅ command adds a file to the staging area: git add &lt;file-name&gt;  
  
✅ command adds one or more files to the : git add &lt;file-name&gt;  
&lt;second-file-name&gt;&lt;third-file-name&gt;  
  
✅ command unstages the file, but it preserves the file contents: git reset &lt;file-name&gt;
