An open API service indexing awesome lists of open source software.

https://github.com/DevOpsWithAlii/Git-for-devops

Understanding Git/Github
https://github.com/DevOpsWithAlii/Git-for-devops

Last synced: about 1 year ago
JSON representation

Understanding Git/Github

Awesome Lists containing this project

README

          

#Git for Devops and Cloud Engineer

```markdown for everyone doston
# Git Workflow Example

## 1. List Files
```bash
ls
```

## 2. List All Files (Including Hidden Ones)
```bash
ls -a
```

## 3. Check Git Status
```bash
git status
```

## 4. Create New Text Files
```bash
touch nibba.txt nibbi.txt
```

## 5. Check Git Status Again
```bash
git status
```

## 6. Remove a File
```bash
rm mygitfile.txt
```

## 7. Check Git Status Again
```bash
git status
```

## 8. Add a File to Git
```bash
git add nibbi.txt
```

## 9. Check Git Status Again
```bash
git status
```

## 10. Add Another File to Git
```bash
git add nibba.txt
```

## 11. Check Git Status Again
```bash
git status
```

## 12. Remove a File from Staging Area (Not from Disk)
```bash
git rm --cached nibbi.txt
```

## 13. Check Git Status Again
```bash
git status
```

## 14. Re-add the Removed File
```bash
git add nibbi.txt
```

## 15. Check Git Status Again
```bash
git status
```

## 16. Commit Changes with a Message
```bash
git commit -m "adding nibba nibbi"
```

## 17. Clear Terminal Screens
```bash
clear
```

## 18. List Files
```bash
ls
```

## 19. Remove a File
```bash
rm nibbi.txt
```

## 20. Check Git Status Again
```bash
git status
```

## 21. Restore the Removed File
```bash
git restore nibbi.txt
```

## 22. Check Git Status Again
```bash
git status
```

## 23. List Files
```bash
ls
```

## 24. Set Git User Name
```bash
git config --global user.name "DevOpsWithAli"
```

## 25. Set Git User Email
```bash
git config --global user.email "amreeta9798@gmail.com"
```

## 26. Edit a File
```bash
vim nibbi.txt
```

## 27. Check Git Status Again
```bash
git status
```

## 28. Add the Edited File to Git
```bash
git add nibbi.txt
```

## 29. Commit Changes with a Message
```bash
git commit -m "added new changes to nibbi"
```

## 30. Clear Terminal Screen
```bash
clear
```

## 31. Check Git Status
```bash
git status
```

## 32. List Files
```bash
ls
```

## 33. View Git Commit History
```bash
git log
```

## 34. Edit a File
```bash
vim nibba.txt
```

## 35. Edit Another File
```bash
vim nibbi.txt
```

## 36. Add the Edited File to Git
```bash
git add nibbi.txt
```

## 37. Check Git Status Again
```bash
git status
```

## 38. Commit Changes with a Message
```bash
git commit -m "added nibbi changes"
```

## 39. View Git Commit History
```bash
git log
```

## 40. Clear Terminal Screen
```bash
clear
```

## 41. Check Time
```bash
time
```

## 42. Check Current Date
```bash
date
```

## 43. Check and Set Time Zone
```bash
timedatectl
timedatectl list-timezones
sudo timedatectl set-timezone Asia/Kolkata
```

## 44. Check the Date Again
```bash
date
```

## 45. Clear Terminal Screen
```bash
clear
```

## 46. View Git Commit History
```bash
git log
```

## 47. Edit a File
```bash
vim nibbi.txt
```

## 48. Add the Edited File to Git
```bash
git add nibbi.txt
```

## 49. Commit Changes with a Message
```bash
git commit -m "added nibbi new changes"
```

## 50. View Git Commit History
```bash
git log
```

## 51. Check Branches
```bash
git branch
```

## 52. Create a New Branch
```bash
git checkout -b dev
```

## 53. Check Git Status
```bash
git status
```

## 54. Switch Back to Master Branch
```bash
git checkout master
```

## 55. Check Git Status Again
```bash
git status
```

## 56. Switch Back to Dev Branch
```bash
git checkout dev
```

## 57. Check Git Status Again
```bash
git status
```

## 58. Create a New File
```bash
touch nibbu.txt
```

## 59. List Files
```bash
ls
```

## 60. Check Git Status
```bash
git status
```

## 61. Add the New File to Git
```bash
git add nibbu.txt
```

## 62. Commit Changes with a Message
```bash
git commit -m "added nibbu new changes"
```

## 63. List Files
```bash
ls
```

## 64. Check Git Status
```bash
git status
```

## 65. Switch Back to Master Branch
```bash
git checkout master
```

## 66. List Files
```bash
ls
```

## 67. View Git Commit History
```bash
git log
```

## 68. Switch Back to Dev Branch
```bash
git checkout dev
```

## 69. View Git Commit History
```bash
git log
```

## 70. Quit Log Viewer
```bash
q
```

## 71. Check Branches
```bash
git branch
```

## 72. Switch Back to Master Branch
```bash
git checkout master
```

## 73. Check Branches Again
```bash
git branch
```

## 74. Create a New Branch
```bash
git checkout -b dev2
```

## 75. Switch to the New Branch
```bash
git checkout dev2
```

## 76. Check Git Status
```bash
git status
```

## 77. View Git Commit History
```bash
git log
```

## 78. Check Branches
```bash
git branch
```

## 79. View Git Commit History in One Line
```bash
git log --oneline
```

## 80. Switch Back to Dev Branch
```bash
git checkout dev
```

## 81. View Git Commit History in One Line
```bash
git log --oneline
```
```