Skip to content

Instantly share code, notes, and snippets.

@donpdonp
Created September 16, 2011 17:07
Show Gist options
  • Save donpdonp/1222567 to your computer and use it in GitHub Desktop.
Save donpdonp/1222567 to your computer and use it in GitHub Desktop.
## Both a staged and an unstaged change
donp@sparky:~/code/lockerproject/Locker$ gs
# On branch master
# Changes to be committed:
# (use "git reset HEAD <file>..." to unstage)
#
# modified: Config/config.json.example
#
# Changes not staged for commit:
# (use "git add <file>..." to update what will be committed)
# (use "git checkout -- <file>..." to discard changes in working directory)
#
# modified: Config/config.json.example
#
# Untracked files:
# (use "git add <file>..." to include in what will be committed)
#
# Apps/PicShare/
## Curious diff
donp@sparky:~/code/lockerproject/Locker$ git diff
diff --git a/Config/config.json.example b/Config/config.json.example
index edd94e6..955f6b7 100644
--- a/Config/config.json.example
+++ b/Config/config.json.example
@@ -11,6 +11,16 @@
"mongo" : {
"dataDir": "mongodata",
"host": "localhost",
+<<<<<<< Updated upstream
"port": 27018
+ },
+ "dashboard" : {
+ "customLogo": "tlp_logo.png",
+ "customFooter": "singly-footer.html",
+ "customTitle": "the locker project"
+ }
+=======
+ "port": 27017
}
+>>>>>>> Stashed changes
}
## git reset took care of the unstaged change only
donp@sparky:~/code/lockerproject/Locker$ git checkout Config/config.json.example
donp@sparky:~/code/lockerproject/Locker$ gs
# On branch master
# Changes to be committed:
# (use "git reset HEAD <file>..." to unstage)
#
# modified: Config/config.json.example
#
# Untracked files:
# (use "git add <file>..." to include in what will be committed)
#
# Apps/PicShare/
## reset again to unstage the staged change
donp@sparky:~/code/lockerproject/Locker$ git reset Config/config.json.example
Unstaged changes after reset:
M Config/config.json.example
## One unstaged (formerly staged) change
donp@sparky:~/code/lockerproject/Locker$ gs
# On branch master
# Changes not staged for commit:
# (use "git add <file>..." to update what will be committed)
# (use "git checkout -- <file>..." to discard changes in working directory)
#
# modified: Config/config.json.example
#
# Untracked files:
# (use "git add <file>..." to include in what will be committed)
#
# Apps/PicShare/
no changes added to commit (use "git add" and/or "git commit -a")
## After checkout, all clean
donp@sparky:~/code/lockerproject/Locker$ git checkout Config/config.json.example
donp@sparky:~/code/lockerproject/Locker$ gs
# On branch master
# Untracked files:
# (use "git add <file>..." to include in what will be committed)
#
# Apps/PicShare/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment