Created
November 22, 2018 11:18
-
-
Save jbardon/b90e6fa384f4e6f58b25d532f361f908 to your computer and use it in GitHub Desktop.
Learn git (Medium article)
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
#!/bin/bash | |
mkdir learn-git | |
cd learn-git | |
# Init repository | |
git init | |
touch react.txt | |
touch vue.txt | |
git add . | |
git commit -m'Initial commit' | |
# Basic path | |
echo 'React' > react.txt | |
git status | |
git add react.txt | |
git status | |
git commit -m'Update React file' | |
echo 'React.js' > react.txt | |
echo 'Vue.js' > vue.txt | |
# Can't commit with empty staging | |
git commit -m'Update React again' | |
git status | |
# Only take files from staging | |
git add react.txt | |
git status | |
git commit -m'Update React again' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment