SourceTree
-
In Preferences, add your name and email address.
-
Change "Check default remotes for updates" to every 1 minute?
-
Windows users: In Preferences > Diff tab, set P4Merge to your diff and merge tools.
Command Line
-
Set your identity.
git config --global user.name "John Doe" git config --global user.email [email protected]
-
Optionally, set your desired editor for commit messages. Examples:
git config --global core.editor emacs git config --global core.editor "'C:/Program Files/Notepad++/notepad++.exe' -multiInst -nosession"
SourceTree
Command Line
-
git help
orgit help command
rivoli:forking-test merose$ git help checkout GIT-CHECKOUT(1) Git Manual GIT-CHECKOUT(1) NAME git-checkout - Checkout a branch or paths to the working tree SYNOPSIS git checkout [-q] [-f] [-m] [<branch>] ...
First, go to GitHub and copy the repository URL.
SourceTree * In the repository list (Window > SourceTree), click "+ New Repository" > Clone from URL. * Enter the URL from GitHub and press "Clone".
Command Line * In the directory where you want to create a subdirectory with the cloned repository,
git clone url-copied-from-github
-
Creating a repository
-
Making changes on GitHub
-
Cloning to a local copy
-
Making local changes
-
Committing changes
-
Pushing changes to GitHub
-
Creating a release (talk about tags)
-
Fixing problems: merging from GitHub to local
-
On GitHub, browse to the https://github.com/arduino/Arduino repository.
-
Look at the history for README.md. How many changes have been made this year?
-
Use the blame view to find out when line 11 was last changed, and by whom.
-
Create a repository, add a license, and create a README.
-
Edit the README to add a description.
-
Install SourceTree and/or GitHub, and perhaps P4Merge.
-
Create GitHub account, if needed.
-
Create a new repository with a license.
-
Add a README file.
-
Edit the README.md file to include some text saying this file was created for a GitHub class.
-
Commit the change to the README.md file.
-
Turn off the Wiki feature.
-
Look at the commit history, and view the commit where you edited the README.md file.
GitHub does not use git-flow: http://scottchacon.com/2011/08/31/github-flow.html. Instead uses GitHub Flow.
To rename files, need to either use git mv
or Actions > Move in SourceTree.
Should we talk about submodules? No, too complicated.
The materials for this class are licensed under the Apache license. See the file LICENSE for details.
Copyright 2015 Mark Rose
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.