Skip to content

Instantly share code, notes, and snippets.

@mbazaliy
Forked from merenkoff/git_help_wiki.md
Created August 1, 2013 08:57
Show Gist options
  • Save mbazaliy/6129707 to your computer and use it in GitHub Desktop.
Save mbazaliy/6129707 to your computer and use it in GitHub Desktop.
<script src="http://coderwall.com/javascripts/jquery.coderwall.js"></script>

Git HELP WIKI

This is the manual that help you use git/github

http://git-scm.com/book/ru/

Start using git

git config --global user.name "Your name"  
git config --global user.email "[email protected]"

Making New REPO

Run you Terminal application

    $ cd MyBestProject
    $ git init

Add remote to existing repo

First you must check existing remotes

$ git remote -v

If you want to add new remote please name it like this::

$ git remote add origin [email protected]:my_best_nickname_on_git/project_name.git
$ git remote add upstream [email protected]:company_name/project_name.git

BRANCHES

branch_state_1

Create new feature

$ git checkout -b iss53
Switched to a new branch "iss53"

branch_state_2

$ git commit -a -m 'added a new footer [issue 53]'

branch_state_3

$ git push origin HEAD:NewFutureBranchName
  1. Go to github.com
  2. Pull request new future
  3. Return to terminal.app then it merged.

develompent -- it is your main branch for development

$ git checkout development
$ git fetch upstream
$ git rebase upstream/master

How to: Delete a remote Git tag

If you have a tag named '12345' then you would just do this:

git tag -d 12345
git push origin :refs/tags/12345

That will remove '12345' from the remote repository.

How to: How do I merge pull request?

Step 0: git fetch upstream

Step 1: Check out a new branch to test the changes — run this from your project directory git checkout -b merenkoff-master upstream/master

Step 2: Bring in merenkoff's changes and test git pull [email protected]:merenkoff/wti-ios-2.git master

RESOLVE CONFLICTS and review CODE

Step 3: Commits modified code if necessary git commit -am "fixed commit or "

Step 4: Merge the changes and update the server git push upstream master

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