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

How to Git Clone a Specific Commit | Pull a Single Commit from GitHub or GitLab смотреть онлайн

📁 Обучение 👁️ 16 📅 04.12.2023

? Wanna clone that specific Git commit?

? No problemo! ?

Git might not give you a direct command to clone a single commit from a branch, but for that, but we've got some sneaky tricks up our sleeves. ?

? First up, the 'Clone-and-Reset' dance! ??

1. Clone the branch that's got the golden commit you're after.
2. Reset your workspace to that magical commit state.

Now, let's spill the tea ☕ on the alternatives, darling!

? The 'Clone-and-Branch' vibe! ?

You get a new branch – big deal! ? Local branches can be ditched easily, no sweat!

? Benefits and Drawbacks? We've got 'em! ?

Clone-and-Reset: Staying on one branch is fabulous, but sharing your changes might be drama ?, especially on a shared repo!

Clone-and-Branch: A new branch? Not a biggie! Pushing changes back to the server? Piece of ?!

?️ Here's how to Git Clone a Specific Commit like a boss! ?️

1. Grab the remote repo's URL.
2. Git clone it, duh!
3. Switch to the branch with your dreamy commit.
4. Get that 7-digit SHA id, like it's your lucky charm.
5. Smack it with a hard git reset – bam! ?

? Example time! ?

Let's say you're vibing with the third last commit (ID: fcbd92b) on the master branch of your GitHub treasure trove! ?


git clone https://github.com/cameronmcnz/rock-paper-scissors.git
git reset --hard fcbd92b

Tada! You're one sassy cat with a specific commit clone! ?

? Alternate Strategy Alert! ?

1. Clone the remote.
2. Birth a new branch from your commit crush.
3. Switch to that branch, baby!

? How to minimize clone depth? ?

Sometimes you just wanna keep it shallow, right? ? Use the '--depth' flag to set your clone depth and get only what you need!


git clone --depth 5 https://github.com/cameronmcnz/rock-paper-scissors.git

Voila! Only 5 commits in your life! ?

Now, go out there and Git Clone those commits like the superstar developer you are! ????? #GitMagic #CloneThatCommit


(By the way, I didn't write that.)

0:00 Clone specific git commit?
0:43 Clone a GitHub repo w specific commit
2:55 Hard git reset to specific commit
3:51 Git log a dog
5:11 2nd git clone specific commit option
5:55 Create branch off specific commit
6:36 Switch to specific git commit branch
8:29 Merge specific commit branch
9:06 View merge of specific commit to main
10:08 Suggested reading
10:40 Scrum Master Certification Guide

Что делает видео по-настоящему запоминающимся? Наверное, та самая атмосфера, которая заставляет забыть о времени. Когда вы заходите на RUVIDEO, чтобы посмотреть онлайн «How to Git Clone a Specific Commit | Pull a Single Commit from GitHub or GitLab» бесплатно и без регистрации, вы рассчитываете на нечто большее, чем просто загрузку плеера. И мы это понимаем. Контент такого уровня заслуживает того, чтобы его смотрели в HD 1080, без дрожания картинки и бесконечного буферизации.

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

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

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