changed 6 years ago
Linked with GitHub

HackyHour Potsdam 2019-01-09

When: January 9th, 2019 at 2:00pm CET
Where: Café Freundlich, Map
Info: Hacky Hour Potsdam Webseite

What is git and why should I use it

Some commands

# Create an empty Git repository or reinitialize an existing one
git init

# Clone a repository into a new directory
git clone <repository> [<directory>]

# Show the working tree status
git status

# Show commit logs:  -1 last commit, --oneline shorter output
git log [-1] [--oneline] [...]

# Add file contents to the index
git add [<file> ...]

# Record changes to the repository
git commit [-m <message>] [<file> ...]

# List, create, or delete branches
git branch <branchname>
# Switch branches or restore working tree files
git checkout <branchname>
# Creates and switches to <branchname>, combines git branch & git checkout
git checkout -b <branchname>

# Show changes between commits, commit and working tree, etc
git diff [<branch-a> <branch-b>] [--word-diff] [--staged (after add)]

# Update remote refs along with associated objects
git push <remote> <branchname>

# Download objects and refs from another repository
git fetch <remote>
# Join two or more development histories together
git merge <branchname>
# Fetch from and integrate with another repository or a local branch
# Combines git fetch and git merge
git pull <remote> <branch>

# Sets name and email globally for commit messages. Without --global it will be
# set for the current repository
git config --global user.name "John Doe"
git config --global user.email "john.doe@host.tld"

# Set the default editor
git config --global core.editor "<editor>"

Questions

  • Set up a Mailinglist for HackyHour? To send questions from participants
  • Keeping a fork in sync
  • Authentication

Participants

Pierre Sakic : pierre.sakic@gfz-potsdam.de
Michael Pons : ponsm@gfz-potsdam.de
Ingmar Nitze : ingmar.nitze@awi.de
Derek Neuharth : djneuh@gfz-potsdam.de
Moritz Kreuzer : kreuzer@pik-potsdam.de
Anne Glerum : acglerum@gfz-potsdam.de

Select a repo