Skip to content

Instantly share code, notes, and snippets.

@AD7six
Created January 18, 2015 00:03
Show Gist options
  • Save AD7six/76f3ed193f1549309ac1 to your computer and use it in GitHub Desktop.
Save AD7six/76f3ed193f1549309ac1 to your computer and use it in GitHub Desktop.
-> cd example/
www-data @ dev [ /tmp/example ]
-> echo "some stuff" > somefile
www-data @ dev [ /tmp/example ]
-> git init
Initialized empty Git repository in /tmp/example/.git/
www-data @ dev [ /tmp/example ] (master #%)
-> git add somefile
www-data @ dev [ /tmp/example ] (master #)
-> echo "somefile" > .gitignore
www-data @ dev [ /tmp/example ] (master #%)
-> git add .gitignore
www-data @ dev [ /tmp/example ] (master #)
-> git commit -va
1 adding somefile
2 # Please enter the commit message for your changes. Lines starting
3 # with '#' will be ignored, and an empty message aborts the commit.
4 # On branch master
5 #
6 # Initial commit
7 #
8 # Changes to be committed:
9 # (use "git rm --cached <file>..." to unstage)
10 #
11 # new file: .gitignore
12 # new file: somefile
13 #
14 diff --git .gitignore .gitignore
15 new file mode 100644
16 index 0000000..ebf038b
17 --- /dev/null
18 +++ .gitignore
19 @@ -0,0 +1 @@
20 +somefile
21 diff --git somefile somefile
22 new file mode 100644
23 index 0000000..b5fd817
24 --- /dev/null
25 +++ somefile
26 @@ -0,0 +1 @@
27 +some stuff
".git/COMMIT_EDITMSG" 27L, 575C written
[master (root-commit) 3219935] adding somefile
2 files changed, 2 insertions(+)
create mode 100644 .gitignore
create mode 100644 somefile
www-data @ dev [ /tmp/example ] (master)
-> echo "different" > somefile
www-data @ dev [ /tmp/example ] (master *)
-> git status
# 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: somefile
#
no changes added to commit (use "git add" and/or "git commit -a")
www-data @ dev [ /tmp/example ] (master *)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment