|
|
Line 117: |
Line 117: |
| *list the branches you have locally <code>git branch --list</code> | | *list the branches you have locally <code>git branch --list</code> |
| *list the branches that are on remotes <code>git branch -r --list</code> | | *list the branches that are on remotes <code>git branch -r --list</code> |
| *checkout a remote branch, setting the local one to track <code>git checkout -t freephile/patch-1</code> | | *checkout a remote branch, setting the local one to track <code>git checkout -t freephile/patch-1</code> or simply <code>git checkout patch-1</code> if <code>push.autoSetupRemote</code> is set properly |
| *git branch --merged (while on master) shows you branches which are fully contained in HEAD, and can be deleted. | | *git branch --merged (while on master) shows you branches which are fully contained in HEAD, and can be deleted. |
|
| |
|
Line 287: |
Line 287: |
| The short version is | | The short version is |
|
| |
|
| # Go to GitHub.com and create a new repo - but only create a README and/or LICENSE (the less the better). | | #Go to GitHub.com and create a new repo - but only create a README and/or LICENSE (the less the better). |
| # Copy the HTTPS "clone" URL (or the SSH one if you have an authorized key on the remote host). | | #Copy the HTTPS "clone" URL (or the SSH one if you have an authorized key on the remote host). |
| # Go to your remote host where you have developed your code | | #Go to your remote host where you have developed your code |
| # git init your project if you haven't already. And also configure git with user.name and user.email | | #git init your project if you haven't already. And also configure git with user.name and user.email |
| # git add . | | #git add . |
| # git commit -m 'First commit' | | #git commit -m 'First commit' |
| # git remote add the URL from step 2 | | #git remote add the URL from step 2 |
| # git pull --rebase | | #git pull --rebase |
| # git push | | #git push |
|
| |
|
| <br /> | | <br /> |