Press enter to submit commands
$ git remote add origin git@github.com:m-dev-/try_git.git
Success!
$ git push -u origin master
Branch master set up to track remote branch master from origin . Success!
$ git pull origin master
Merge made by the 'recursive' strategy.
Success!
$ git diff HEAD
diff --git a/octocat.txt b/octocat.txt
index 7d8d808..e725ef6 100644
--- a/octocat.txt
+++ b/octocat.txt
@@ -1 +1 @@
-A Tale of Two Octocats
+A Tale of Two Octocats and an Octodog
Success!
$ git add octofamily/octodog.txt
Success!
$ git diff --staged
diff --git a/octofamily/octodog.txt b/octofamily/octodog.txt
new file mode 100644
index 0000000..cfbc74a
--- /dev/null
+++ b/octofamily/octodog.txt
@@ -0,0 +1 @@
+woof
Success!
$ git reset octofamily/octodog.txt
Success!
$ git checkout -- octocat.txt
Success!
$ git branch clean_up
Success!
$ git branch
clean_up
- master
Use 'git checkout' to switch to the 'clean_up' branch
$ git checkout
You forgot to specify what you wanted to checkout, give me something to work with!
$ git checkout clean_up
Switched to branch 'clean_up'
Success!
$ git rm '*.txt'
rm 'blue_octocat.txt'
rm 'octocat.txt'
rm 'octofamily/baby_octocat.txt'
rm 'octofamily/momma_octocat.txt'
rm 'red_octocat.txt'
Success!
$ git status
Did not use git commit
$ git commit -m "Remove all the cats"
[clean_up 2f8daba] Remove all the cats
5 files changed, 5 deletions(-)
delete mode 100644 blue_octocat.txt
delete mode 100644 octocat.txt
delete mode 100644 octofamily/baby_octocat.txt
delete mode 100644 octofamily/momma_octocat.txt
delete mode 100644 red_octocat.txt
Success!
$ git checkout master
Switched to branch 'master'
Success!
$ git merge clean_up
Updating fca2ba0..f6e0048
Fast-forward
blue_octocat.txt | 1 -
octocat.txt | 1 -
octofamily/baby_octocat.txt | 1 -
octofamily/momma_octocat.txt | 1 -
red_octocat.txt | 1 -
5 files changed, 5 deletions(-)
delete mode 100644 blue_octocat.txt
delete mode 100644 octocat.txt
delete mode 100644 octofamily/baby_octocat.txt
delete mode 100644 octofamily/momma_octocat.txt
delete mode 100644 red_octocat.txt
Success!
$ git branch -d clean_up
Deleted branch clean_up (was 991a502).
Success!
$ git push
To [email protected]:m-dev-/try_git.git
- af25aa2...5d32f35 master -> master (forced update)
Success!