<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://aznot.com/index.php?action=history&amp;feed=atom&amp;title=Git%2FOpenWest_2016_Git_Basics</id>
	<title>Git/OpenWest 2016 Git Basics - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://aznot.com/index.php?action=history&amp;feed=atom&amp;title=Git%2FOpenWest_2016_Git_Basics"/>
	<link rel="alternate" type="text/html" href="https://aznot.com/index.php?title=Git/OpenWest_2016_Git_Basics&amp;action=history"/>
	<updated>2026-05-08T19:49:37Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.41.0</generator>
	<entry>
		<id>https://aznot.com/index.php?title=Git/OpenWest_2016_Git_Basics&amp;diff=3572&amp;oldid=prev</id>
		<title>Kenneth: /* Remote Repositories */</title>
		<link rel="alternate" type="text/html" href="https://aznot.com/index.php?title=Git/OpenWest_2016_Git_Basics&amp;diff=3572&amp;oldid=prev"/>
		<updated>2016-07-16T17:43:42Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Remote Repositories&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;== Presentation ==&lt;br /&gt;
&lt;br /&gt;
Presentation:&lt;br /&gt;
 https://www.openwest.org/schedule/#talk-190&lt;br /&gt;
&lt;br /&gt;
Slides:&lt;br /&gt;
 https://drive.google.com/open?id=1DUYry3lm66y_be_eerQblcmr27HI31FWnOxaUcnQSJY&lt;br /&gt;
&lt;br /&gt;
Presenter:&lt;br /&gt;
 Author: Mike Straw &amp;lt;straw@ohio.edu&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: &amp;quot;Git (https://git-scm.com/) is an open source distributed version control system that can and does help manage everything from the smallest to the largest development environments. In this tutorial, we’ll explore the basics of using Git, and get our hands dirty with a small development environment using command-line, GUI, and web-based interfaces and look at some tools that can make Git even easier.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Git ==&lt;br /&gt;
&lt;br /&gt;
https://git-scm.com/&lt;br /&gt;
&lt;br /&gt;
== VCS ==&lt;br /&gt;
&lt;br /&gt;
Version Control System&lt;br /&gt;
&lt;br /&gt;
types:&lt;br /&gt;
* Local (eg. Word Track Changes)&lt;br /&gt;
* Centralized (eg. Subversion)&lt;br /&gt;
* Decentralized (eg. Git, Mercurial)&lt;br /&gt;
&lt;br /&gt;
Git tracks changes, not versions, called &amp;quot;change sets&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Three tree architecture:&lt;br /&gt;
* working&lt;br /&gt;
* staging (git add)&lt;br /&gt;
* repository (git commit)&lt;br /&gt;
&lt;br /&gt;
== Configuration ==&lt;br /&gt;
&lt;br /&gt;
Config:&lt;br /&gt;
* system (--system)    # /etc/gitconfig&lt;br /&gt;
** git config --system -l&lt;br /&gt;
* user (--global)    # ~/.gitconfig&lt;br /&gt;
** git config --global -l&lt;br /&gt;
* file (--file) [file]   # specify config&lt;br /&gt;
** git config --file .git/config -l&lt;br /&gt;
* project --file .git/config&lt;br /&gt;
** git config --file .git/config -l&lt;br /&gt;
* all&lt;br /&gt;
** git config -l&lt;br /&gt;
&lt;br /&gt;
Config:&lt;br /&gt;
 git config --global user.name &amp;#039;Kenneth Burgener&amp;#039;&lt;br /&gt;
 git config --global user.email &amp;#039;kenneth@oeey.com&amp;#039;&lt;br /&gt;
 git config --global core.editor /usr/bin/vim    # set editor to vim&lt;br /&gt;
 git config --global core.editor `which vim`    # set editor to vim&lt;br /&gt;
 git config --global color.ui true    # use color&lt;br /&gt;
 git config --global -l    # list user configurations&lt;br /&gt;
 git config --system -l    # list system configurations&lt;br /&gt;
 git config --file .git/config -l    # list project configurations&lt;br /&gt;
 git config -l    # list all configurations&lt;br /&gt;
&lt;br /&gt;
== Help ==&lt;br /&gt;
&lt;br /&gt;
Help:&lt;br /&gt;
 git help&lt;br /&gt;
 git help init&lt;br /&gt;
 git help log&lt;br /&gt;
&lt;br /&gt;
== Basics ==&lt;br /&gt;
&lt;br /&gt;
Verison:&lt;br /&gt;
 git --version&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
First Project:&lt;br /&gt;
 mkdir gittest&lt;br /&gt;
 cd gittest&lt;br /&gt;
 git init&lt;br /&gt;
 ls .git&lt;br /&gt;
&lt;br /&gt;
Status:&lt;br /&gt;
 git status&lt;br /&gt;
&lt;br /&gt;
Stage file:&lt;br /&gt;
 git add file.txt&lt;br /&gt;
&lt;br /&gt;
 # stage all files below current directory:&lt;br /&gt;
 git add .&lt;br /&gt;
&lt;br /&gt;
Stage file example:&lt;br /&gt;
 git status&lt;br /&gt;
 touch file1.txt&lt;br /&gt;
 git add file1.txt&lt;br /&gt;
 git status&lt;br /&gt;
&lt;br /&gt;
Commit:&lt;br /&gt;
 git commit -m &amp;#039;my first commit&amp;#039;&lt;br /&gt;
 git commit   # will ask for message in editor&lt;br /&gt;
&lt;br /&gt;
Log:&lt;br /&gt;
 git log&lt;br /&gt;
 git log -n 1&lt;br /&gt;
 git log -1&lt;br /&gt;
 git log &amp;lt;commit&amp;gt;&lt;br /&gt;
 git log &amp;lt;commit&amp;gt;..&amp;lt;commit&amp;gt;&lt;br /&gt;
 git log --grep=&amp;quot;first&amp;quot;&lt;br /&gt;
 git log --since=”&amp;lt;time&amp;gt;”&lt;br /&gt;
 git log --pretty=short&lt;br /&gt;
 git log --oneline    # this one is useful&lt;br /&gt;
 git log --pretty=format:&amp;quot;%h - %an, %ar : %s&amp;quot;&lt;br /&gt;
 git help log&lt;br /&gt;
&lt;br /&gt;
Hashes:&lt;br /&gt;
* Codes on commit and log are SHA-1 encrypted hashes&lt;br /&gt;
* Based on exact contents of data - will change if tampered with&lt;br /&gt;
* Can refer to them by the first # of chars to make it unique (usually 8-10)&lt;br /&gt;
&lt;br /&gt;
Upstaging a file:&lt;br /&gt;
 echo &amp;quot;changes&amp;quot; &amp;gt;&amp;gt; file1.txt&lt;br /&gt;
 git checkout file1.txt&lt;br /&gt;
&lt;br /&gt;
== Stash ==&lt;br /&gt;
&lt;br /&gt;
 git stash&lt;br /&gt;
 git pop&lt;br /&gt;
&lt;br /&gt;
== Tags ==&lt;br /&gt;
&lt;br /&gt;
Tags:&lt;br /&gt;
 git tag 1.0    # tag current code as 1.0&lt;br /&gt;
 git tag    # shows list of tags&lt;br /&gt;
 git tag -l    # shows list of tags&lt;br /&gt;
 cat .git/refs/tags/1.0    # show tag 1.0 hash&lt;br /&gt;
 git show 1.0    # show tag change set&lt;br /&gt;
 git tag -a v1.2 9fceb02    # create a tag &amp;#039;v1.2&amp;#039; at hash &amp;#039;9fceb02&amp;#039;&lt;br /&gt;
 git push origin v1.2    # push tag to remote (does not happen by default)&lt;br /&gt;
 git push origin --tags    # show remote tags&lt;br /&gt;
 git checkout v1.2    # checkout changeset at tag v1.2&lt;br /&gt;
 git checkout -b version12 v1.2    # checkout changeset at tag v1.2 as new branch&lt;br /&gt;
&lt;br /&gt;
== Reset ==&lt;br /&gt;
&lt;br /&gt;
Reset file back to last commit:&lt;br /&gt;
 git checkout -- file1.txt&lt;br /&gt;
&lt;br /&gt;
 git checkout -- .&lt;br /&gt;
&lt;br /&gt;
Reset staged change:&lt;br /&gt;
 git reset HEAD file1.txt&lt;br /&gt;
&lt;br /&gt;
== Removing a file ==&lt;br /&gt;
&lt;br /&gt;
Ugly way:&lt;br /&gt;
 rm file1.txt&lt;br /&gt;
 git add file1.txt&lt;br /&gt;
&lt;br /&gt;
Cleaner way:&lt;br /&gt;
 git rm file1.txt&lt;br /&gt;
&lt;br /&gt;
== Amending Commit Message ==&lt;br /&gt;
&lt;br /&gt;
Change last commit message:&lt;br /&gt;
 commit --amend -m &amp;#039;new message&amp;#039;&lt;br /&gt;
&lt;br /&gt;
== Diff ==&lt;br /&gt;
&lt;br /&gt;
 git diff&lt;br /&gt;
 git diff &amp;lt;commit&amp;gt;&lt;br /&gt;
 git diff &amp;lt;commit&amp;gt; &amp;lt;another commit&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Branching ==&lt;br /&gt;
&lt;br /&gt;
Create a branch: (but not switch to it)&lt;br /&gt;
 git branch &amp;lt;branch name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Switch to an existing branch:&lt;br /&gt;
 git checkout &amp;lt;branch name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Create and switch to branch all in one:&lt;br /&gt;
 git checkout -b &amp;lt;branch name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Switch to an existing branch:&lt;br /&gt;
 git checkout &amp;lt;branch name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
List branches:&lt;br /&gt;
 git branch&lt;br /&gt;
&lt;br /&gt;
Merge other branch into current branch:&lt;br /&gt;
 git merge &amp;lt;other branch&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 git checkout master&lt;br /&gt;
 git merge mybranch   # merge mybranch into master&lt;br /&gt;
&lt;br /&gt;
Rename a branch:&lt;br /&gt;
 git branch -m &amp;lt;old name&amp;gt; &amp;lt;new name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Delete a fully merged branch:&lt;br /&gt;
 git branch -d &amp;lt;branch name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Delete a branch: (with prejudice)&lt;br /&gt;
 git branch -D &amp;lt;branch name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Merging ==&lt;br /&gt;
&lt;br /&gt;
Merge other branch into current branch:&lt;br /&gt;
 git merge &amp;lt;other branch&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 git checkout master&lt;br /&gt;
 git merge mybranch   # merge mybranch into master&lt;br /&gt;
&lt;br /&gt;
Complete merge:&lt;br /&gt;
 # edit conflicted files&lt;br /&gt;
 git add &amp;lt;conflicted_file&amp;gt;&lt;br /&gt;
 git commit -m &amp;#039;merged files&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Abort current merge attempt:&lt;br /&gt;
 git merge --abort&lt;br /&gt;
&lt;br /&gt;
This doesn&amp;#039;t seem to work, but this does:&lt;br /&gt;
 git checkout master -f&lt;br /&gt;
&lt;br /&gt;
== Remote Repositories ==&lt;br /&gt;
&lt;br /&gt;
 git clone&lt;br /&gt;
&lt;br /&gt;
List branches, including remote:&lt;br /&gt;
 git branch -a&lt;br /&gt;
&lt;br /&gt;
Checkout remote branch:&lt;br /&gt;
 git checkout -b &amp;lt;local branch&amp;gt; &amp;lt;remote branch&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Get all remote branches (from clean directory):&lt;br /&gt;
 git clone --mirror &amp;lt;origin url&amp;gt; .git&lt;br /&gt;
 git config --bool core.bare false&lt;br /&gt;
 git reset --hard&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 git clone ssh://openwest@openwest.thestraws.net/home/openwest/git_demo  # password:4Git2016$tuff&lt;br /&gt;
&lt;br /&gt;
Update from remote:&lt;br /&gt;
 git fetch&lt;br /&gt;
 git pull&lt;br /&gt;
&lt;br /&gt;
Push changes:&lt;br /&gt;
 git push&lt;br /&gt;
&lt;br /&gt;
Push branch:&lt;br /&gt;
 git push -u origin &amp;lt;branch_name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Push all branches:&lt;br /&gt;
 git push --all -u&lt;br /&gt;
&lt;br /&gt;
Pull all branch&lt;br /&gt;
 git pull --all&lt;br /&gt;
&lt;br /&gt;
== github ==&lt;br /&gt;
&lt;br /&gt;
 https://github.com&lt;br /&gt;
&lt;br /&gt;
Can treat like a remote repository&lt;br /&gt;
&lt;br /&gt;
e.g.: git clone https://github.com/scottw/dvcsh&lt;br /&gt;
&lt;br /&gt;
Or visit https://github.com/scottw/dvcsh&lt;br /&gt;
&lt;br /&gt;
github guide: hello world&lt;br /&gt;
 https://guides.github.com/activities/hello-world/&lt;br /&gt;
&lt;br /&gt;
== Other Interfaces ==&lt;br /&gt;
&lt;br /&gt;
GUIs&lt;br /&gt;
* Git GUI https://git-scm.com/docs/git-gui &lt;br /&gt;
* Eclipse Plugin http://www.eclipse.org/egit/ &lt;br /&gt;
* SourceTree https://www.atlassian.com/software/sourcetree &lt;br /&gt;
* Etc., etc., etc.&lt;br /&gt;
Web based&lt;br /&gt;
* Bitbucket / Bitbucket Server (f.k.a. Stash) https://www.atlassian.com/software/bitbucket&lt;br /&gt;
&lt;br /&gt;
== dig deeper ==&lt;br /&gt;
&lt;br /&gt;
Pro Git: https://git-scm.com/book (also in your cloned project)&lt;br /&gt;
&lt;br /&gt;
Git Completion: https://git-scm.com/book/en/v2/Git-in-Other-Environments-Git-in-Bash&lt;br /&gt;
&lt;br /&gt;
GitHub: https://help.github.com/&lt;/div&gt;</summary>
		<author><name>Kenneth</name></author>
	</entry>
</feed>