Skip to content

Instantly share code, notes, and snippets.

@AD7six
Last active December 23, 2015 04:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AD7six/8e13a511472ce9b2ab40 to your computer and use it in GitHub Desktop.
Save AD7six/8e13a511472ce9b2ab40 to your computer and use it in GitHub Desktop.
andy@work:/tmp/so$ git init
Initialised empty Git repository in /tmp/so/.git/
andy@work:/tmp/so$ echo "*" > .gitignore
andy@work:/tmp/so$ git add .gitignore
The following paths are ignored by one of your .gitignore files:
.gitignore
Use -f if you really want to add them.
fatal: no files added
andy@work:/tmp/so$ git add .gitignore -f
andy@work:/tmp/so$ git commit -va
[master (root-commit) 3bb57ee] adding git ignore file
1 file changed, 1 insertion(+)
create mode 100644 .gitignore
andy@work:/tmp/so$ git log
commit 3bb57eebfec4cf6c88220b780204564cbbceb7a4
Author: AD7six <andydawson76@gmail.com>
Date: Mon Sep 16 16:03:23 2013 +0200
adding git ignore file
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment