Skip to content

Instantly share code, notes, and snippets.

@noxqsgit noxqsgit/
Last active Dec 11, 2015

What would you like to do?
git basics

Learn to use git


Use git for your project

$ cd /path/to/your/project
$ git init .

Add a bitbucket remote

$ git remote add origin
                            # change __team__ and __repo__ as appropriate
$ git push origin -u --all  # first push


$ git status


1. Add files

$ git add .                 # add all files in this directory, recursively
$ git add -u                # add all modified files and remove deleted ones

2. Commit

$ git commit -a -m '... message ...'
                            # -a adds all modified files, so you don't need to git add them

3. Push

$ git push


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.