Instantly share code, notes, and snippets.

@noxqsgit /git.md
Last active Dec 11, 2015

Embed
What would you like to do?
git basics

Learn to use git

--> http://try.github.com

Use git for your project

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

Add a bitbucket remote

$ git remote add origin git@bitbucket.org:__team__/__repo__.git
                            # change __team__ and __repo__ as appropriate
$ git push origin -u --all  # first push

Status

$ git status

Development

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

Links

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment