Created: 2024-07-29 Mon 12:48
Version Control with GIT | Mon |
Functional Programming | Tue |
Object Oriented Design | Wed |
Intro to Containers | Thu |
Software Quality Assurance | Fri |
myconfluence.llnl.gov/display/CF
You know the commands:
ls |
list files, with the flags -al |
cd |
change directory |
mkdir |
make directory |
echo |
repeat text |
> |
output redirection |
like this
$
.
Do not include the $
when actually trying to run the command$ git config --global user.name "Ada Lovelace"
$ git config --global user.email "ada@lovelace.io"
$ git config --global core.editor "emacs -nw"
$ git config --global init.defaultBranch main
$ git config --list
$ git config --help
$ cat ~/.gitconfig
~/.gitconfig
[core]
editor = emacs -nw
[init]
defaultBranch = main
[user]
name = Ada Lovelace
email = ada@lovelace.io
$ cd ~/Desktop
$ ls -al
$ mkdir Planets
$ cd Planets
$ git init
Initialized empty Git repository in /Users/gonsie/Desktop/Planets/.git/
$ ls -al
total 0
drwxr-xr-x 3 gonsiorowski1 59746 96 Jul 11 10:43 .
drwx------@ 16 gonsiorowski1 59746 512 Jul 11 10:43 ..
drwxr-xr-x 9 gonsiorowski1 59746 288 Jul 11 10:43 .git
$ git status
On branch main
No commits yet
nothing to commit (create/copy files and use "git add" to track)
$ echo "Cold and dry, but everything is my favorite color" > mars.txt
$ ls -al
total 0
drwxr-xr-x 3 gonsiorowski1 59746 96 Jul 11 10:43 .
drwx------@ 16 gonsiorowski1 59746 512 Jul 11 10:43 ..
drwxr-xr-x 9 gonsiorowski1 59746 288 Jul 11 10:43 .git
-rw-r--r-- 1 gonsiorowski1 59746 50 Jul 11 11:08 mars.txt
$ git status
On branch main
No commits yet
Untracked files:
(use "git add <file>..." to include in what will be committed)
mars.txt
nothing added to commit but untracked files present (use "git add" to track)
$ git add mars.txt
$ git status
On branch main
No commits yet
Changes to be committed:
(use "git rm --cached <file>..." to unstage)
new file: mars.txt
$ git status --short
A mars.txt
$ git commit -m "started work on mars.txt"
[main (root-commit) 3383acd] started work on mars.txt
1 file changed, 1 insertion(+)
create mode 100644 mars.txt
$
$ git status
On branch main
nothing to commit, working tree clean
Content for this talk was taken from Software Carpentry: Git Novice
Created with Emacs, Org Mode, and RevealJS.
View the source.