Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@noxqsgit
Last active December 11, 2015 13:08
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save noxqsgit/4605562 to your computer and use it in GitHub Desktop.
Save noxqsgit/4605562 to your computer and use it in GitHub Desktop.
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