Create branch and push to remote

Git 1.7.0+

$ git checkout -b mynewfeature
... edit files, add and commit ...
$ git push -u origin mynewfeature

Via -

Remove files already in repo

Git keeps tracking the files which were committed to repository before you changed your ".gitignore" files. To ignore these files, you can do by these way:

  1. To ignore one file:
      git rm --cached relativePath/fileName
      git commit -m "commit message"
  1. To ignore many files:
      git rm -r --cached .   # to removes everything from the index.
      git add .              # to add all files except the ones which match the rules in ".gitignore" file(s)
      git commit -m ".gitignore is now working"


GitHub’s collection of .gitignore

A collection of .gitignore templates - GitHub’s collection of .gitignore file templates for many kinds of projects or languages.

Examples of .gitignore

See Also

Last modified 4 years ago Last modified on May 19, 2015, 2:27:54 PM