Jose Robledo
04 March 2025
09:00 | Git: creating repo and tracking changes |
10:30 | Morning break |
11:00 | Git: History and ignoring things |
12:00 | Remotes in GitHub |
12:40 | Post-workshop Survey |
13:00 | END |
We will be using Git interactively today, so it’s important that everyone has it installed locally! Most probabily you already have it installed, if not, you can find how to install it here
$
sign! This
is just an indicator that the following prompt should be typed in your
terminal.$ git
usage: git [-v | --version] [-h | --help] [-C <path>] [-c <name>=<value>]
[--exec-path[=<path>]] [--html-path] [--man-path] [--info-path]
[-p | --paginate | -P | --no-pager] [--no-replace-objects] [--bare]
[--git-dir=<path>] [--work-tree=<path>] [--namespace=<name>]
[--super-prefix=<path>] [--config-env=<name>=<envvar>]
<command> [<args>]
These are common Git commands used in various situations:
start a working area (see also: git help tutorial)
clone Clone a repository into a new directory
init Create an empty Git repository or reinitialize an existing one
work on the current change (see also: git help everyday)
add Add file contents to the index
mv Move or rename a file, a directory, or a symlink
restore Restore working tree files
rm Remove files from the working tree and from the index
We will also be needing to use Github if you want to follow up on the tutorial on how to push your local repository to the cloud. There are other options (Gitlab, Gitbucket, etc.) but we provide a tutorial for Github.
Instructions to create a Github account
A version control system is a tool that keeps track of these changes for us, effectively creating different versions of our files.
It allows us to decide which changes will be made to the next version (each record of these changes is called a commit), and keeps useful metadata about them.
The complete history of commits for a particular project and their metadata make up a repository.
version control is like unlimited ‘undo’ or CTRL-Z.
Allows many people to work in parallel.
Content