Unstage file
Duration: .. minutes
Prerequisites:
1. Set-Up
Copy the code, right-click in PowerShell window to paste it and press Enter to execute
cd ~/Documents/git-workoutsCopy-Item bak-1.6 current -Recurse -Forcecd current3. Edit files
3.1 Open contacts.md in Notepad
Type in PowerShell prompt and press Enter to execute
notepad contacts.md3.2 Add title into contacts.md
Type in the Notepad window
# ContactsPress Ctrl+S to save changes.
Press Ctrl+W to close the window.
3.3 Open todo.md in Notepad
Type in PowerShell prompt and press Enter to execute
notepad todo.md3.4 Add title into todo.md
Type in the Notepad window
# To-DoPress Ctrl+S to save changes.
Press Ctrl+W to close the window.
4. Stage
4.1 Stage all changes
Type in PowerShell prompt and press Enter to execute
git add -A4.2 Check current status of the Working Tree
Type in PowerShell prompt and press Enter to execute
git status
5. Unstage and first commit
5.1 Unstage contacts.md
Type in PowerShell prompt and press Enter to execute
git restore contacts.md --staged5.2 Check current status of the Working Tree
Type in PowerShell prompt and press Enter to execute
git status
5.3 Commit todo.md
Type in PowerShell prompt and press Enter to execute
git commit -m "Add title into todo.md"6. Second commit
6.1 Stage contacts.md
Type in PowerShell prompt and press Enter to execute
git add contacts.md6.3 Commit contacts.md
Type in PowerShell prompt and press Enter to execute
git commit -m "Add title into contacts.md"6.4 View commit history of the repository
Type in PowerShell prompt and press Enter to execute
git log --oneline
7. Wrap-Up
Copy the code, right-click in PowerShell window to paste it and press Enter to execute
cd ..Copy-Item current bak-1.7 -Recurse -ForceRemove-Item current -Recurse -Force