Scientific Computing
git
is a command line utility, like python
or nvim
git
git |
“GitHub” |
---|---|
Command line tool | Website |
Free and open source | Free with paid options |
Works on your own computer | Works on the internet |
Primarily used with GitHub | Primarily used with git |
.wav
file).rm
the project by accident?git
was made to solve this exact problem!git
git
:
git
to:
git
onlinegit
latter if there’s a “GitHub” we can use with git
.edu
email account to get educational access to otherwise premium features.git
is the “repository” which is basically a file system.
hello-world
is great! git
!mkdir
hello-world
:x
back to command line!git
managed repository, we do:hello.py
and have it in our hello-world
directory, it isn’t yet “tracked” by git
!git
only keeps track of what we tell it to!git
now aware of hello.py
, we need to commit our changes for git
to save them.
-m
-a
to commit “all” files.git
on your system before, you’ll have to tell git
who you are.
git
there are no anonymous changes - you have to sign every change you make.main
which we can use for now.branch -M
to main
- the expected name.git
/GitHub and all major operating systems.Generating public/private ed25519 key pair.
Enter file in which to save the key (/home/calvin/.ssh/id_ed25519):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/calvin/.ssh/id_ed25519
git
for that, but we can check if we have a connection easily:The authenticity of host 'github.com (140.82.116.3)' can't be established.
ED25519 key fingerprint is SHA256:+DiY3wvvV6TuJJhbpZisF/zLDA0zPMSvHdkr4UvCOqU.
This key is not known by any other names.
Are you sure you want to continue connecting (yes/no/[fingerprint])?
/home/calvin/.ssh/id_ed25519
ssh-keygen
and it’ll show you.cat
that file in the command linegit push
(after commit
) but we still have a bit of setup to do.git
to attach our local repository to the GitHub repository.git@github.com:cd-public/hello-world
git@github.com:cd-public/hello-world
Enumerating objects: 27, done.
Counting objects: 100% (27/27), done.
Delta compression using up to 22 threads
Compressing objects: 100% (15/15), done.
Writing objects: 100% (16/16), 98.54 KiB | 2.46 MiB/s, done.
Total 16 (delta 11), reused 0 (delta 0), pack-reused 0
remote: Resolving deltas: 100% (11/11), completed with 10 local objects.
To github.com:cd-public/hello-world.git
adaa3a7..ba3c794 main -> main
git config
ssh-keygen
set origin
git add
for new files.bye.py
hello.py
hello.py
git commit -m
then click Commit changespush
, if you have a collaborator or use multiple devices.tax.py
.tax.py
tax.py