RUVIDEO
Поделитесь видео 🙏

comprehensive git tutorial

📁 Лайфхаки 👁️ 16 📅 04.12.2023

A comprehensive tutorial I made for my girlfriend and for anyone else who is interested. The intention of this tutorial is to know the *how* but also know enough of the *why* and where to look further. With this video you will be able to survive with git and gitlab/github on first principles instead copying/pasting commands and hoping it will just work. The ability to debug your own issues in git is quite important and this tutorial will give you enough of that. You will also learn a bit on: less, vim, how to google git issues and ask questions on stackoverflow.

NOTES I MADE DURING THE VIDEO

======= LOCAL SETUP ======
version control management system
tracks changes in files

linus torvalds -- creator linux

your computer: local repository -- downstream
online: github/gitlab/bitbucket remote repository -- upstream

git setup on our computer

1. initialize our git project

iterm -- ohmyzsh

======= GENERAL DAY TO DAY WORKFLOW ======
workspace: the folder that all your code for your project is in

*Saving your files*
1. add it to the staging area (back stage)
--] once everything is ready
2. then you commit all the changes of all the files in the staging area

end product: a new commit

place: workspace
] git add fruits.js
] git add index.html
] git status #for final check
place: staging area
] git commit -m 'we made our first commit!'
place: commit

For seeing your commits:
] git log
For getting out of git log press Q (Q for quit)
(it opens less in the background)
-- git secretly opens up terminal programs in the background
1. less
2. vim

follow lesson 1 from vimtutor to learn enough vim to survive

===== SETTING UP SSH Keys at Gitlab =====

__CHAPTER 1: WHAT IS SSH? AND HOW DOES IT WORK?__
piece text

-MELVIN LOCK-
|piece text |
-------------

private/public key encrypted communication

public key = metaphorical lock that you send out to people so they can encrypt a message by putting your lock on it

private key = metaphorical key that you AND ONLY YOU hold as a secret from anyone else, so that you can unlock any message sent to you you with your lock on it.

Melvin gives his lock to Marvel
Marvel encrypts message by putting my lock on it (encrypt it with public key)
Marvel sends message to Melvin
Melvin decrypts it with his key (with private key)

You and Gitlab

Gitlab needs to know your public key
public SSH key




Create public and private key by
] ssh-keygen -o -t rsa -C "[email protected]" -b 4096

Read key out by
less /Users/[username]/.ssh/gitlab_mettamage_proton_key.pub

Add your key to SSH-Agent
] eval $(ssh-agent -s)
] ssh-add /Users/[username]/.ssh/[your_private_key_name]




] git push [url_online_repository] [branch_name] #uploads it to your remote/online repository (gitlab or github or bitbucket)

] git pull [url_online_repository] #downloads it to your local repository (your computer) -- and also merges it with your local repository and creates a new commit message in vim

git pull is actually (secretly):
1. git fetch
2. git merge [plus some extra flags]

========= FOR FUTHER LEARNING =========
For further learning (e.g. for collaborating with others)

Git histories and git branches (google it)
Merging -- https://www.atlassian.com/git/tutorials/using-branches/git-merge

And if you want to be a bit more advanced (handy but not necessary)
rebasing -- https://www.atlassian.com/git/tutorials/rewriting-history/git-rebase

Что делает видео по-настоящему запоминающимся? Наверное, та самая атмосфера, которая заставляет забыть о времени. Когда вы заходите на RUVIDEO, чтобы посмотреть онлайн «comprehensive git tutorial», вы рассчитываете на нечто большее, чем просто загрузку плеера. И мы это понимаем. Контент такого уровня заслуживает того, чтобы его смотрели в HD 1080, без дрожания картинки и бесконечного буферизации.

Честно говоря, Rutube сегодня — это кладезь уникальных находок, которые часто теряются в общем шуме. Мы же вытаскиваем на поверхность самое интересное. Будь то динамичный экшн, глубокий разбор темы от любимого автора или просто уютное видео для настроения — всё это доступно здесь бесплатно и без лишних формальностей. Никаких «заполните анкету, чтобы продолжить». Только вы, ваш экран и качественный поток.

Если вас зацепило это видео, не забудьте взглянуть на похожие материалы в блоке справа. Мы откалибровали наши алгоритмы так, чтобы они подбирали контент не просто «по тегам», а по настроению и смыслу. Ведь в конечном итоге, онлайн-кинотеатр — это не склад файлов, а место, где каждый вечер можно найти свою историю. Приятного вам отдыха на RUVIDEO!

Видео взято из открытых источников Rutube. Если вы правообладатель, обратитесь к первоисточнику.