Skip to content

Instantly share code, notes, and snippets.

@merenkoff
Last active December 15, 2015 17:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save merenkoff/5299962 to your computer and use it in GitHub Desktop.
Save merenkoff/5299962 to your computer and use it in GitHub Desktop.
Git help wiki
<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 "you@example.com"

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 git@github.com:my_best_nickname_on_git/project_name.git
$ git remote add upstream git@github.com: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 git@github.com: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