Created
August 23, 2013 11:46
-
-
Save yratof/6318460 to your computer and use it in GitHub Desktop.
GIT HELP
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<style> | |
*{font-family: helvetica;} | |
body{color: #333} | |
a{color:#1baebe;} | |
div{margin: 1em; padding: 1em; border-bottom: 1px solid;} | |
textarea{width:100%; padding: 10px; font-size: 1em} | |
</style> | |
<h1>A little bit of Git</h1> | |
<div> | |
To help you out visually, paste this into terminal | |
<p> | |
<textarea>curl -L https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh | sh</textarea> | |
</p> | |
</div> | |
<h3>Starting a new repo - do this via bitbucket + It'll teach you how to do it. | |
<a href="http://bitbucket.org">BitBucket</a> | |
</h3> | |
<div> | |
<p> | |
<strong>To go to a folder where you want to add</strong> | |
<cite>If you've already got a git, drag the parent folder to where the .git file is, normally that is wp-content</cite> | |
<p><textarea>cd /drag/folder/here</textarea></p> | |
</p> | |
</div> | |
<div> | |
<p> | |
<strong>DO THIS BEFORE YOU START WORKING.</strong> | |
<cite>This pulls down the latest commit, which could be from andrew, tom or martin, if you don't pull, you won't be working from the latest version of the files and might overwrite the wrong things.</cite> | |
<p> | |
<textarea>git pull</textarea> | |
</p> | |
</p> | |
</div> | |
<div> | |
<p> | |
<strong>Add all files you've changed</strong> | |
<cite></cite> | |
<p> | |
<textarea>git add -A</textarea> | |
</p> | |
</p> | |
</div> | |
<div> | |
<p> | |
<strong>Commit that to a revision</strong> | |
<cite>You commit when you do something big, commits are what you can revert back to when things all go wrong, so it's wise to commit often. You add a message so other can see what the last thing commit was, or what it means to the project</cite> | |
<p> | |
<textarea>git commit -m "This is my message relating to this version"</textarea> | |
</p> | |
</p> | |
</div> | |
<div> | |
<p> | |
<strong>Submit all your commits to the repo so other people can pull them</strong> | |
<cite>This is like backing up basically, it allows everyone to use the files you've created</cite> | |
<p> | |
<textarea>git push</textarea> | |
</p> | |
</p> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment