Getting Started With Git and GitLab

Поделиться
HTML-код
  • Опубликовано: 28 авг 2024
  • I use GitLab to host my git repositories. Those repositories store my dotfiles, my scripts, my Suckless builds, my wallpapers, and much more. Using git and a host like GitLab makes reinstalling your OS (aka distrohopping, to you Linux users) so much easier.
    REFERENCED:
    ► docs.gitlab.co... - GitLab Basics
    ► www.atlassian.... - Article on Bare Repositories
    ► • Git Bare Repository - ... - DT's Video on Bare Repos
    WANT TO SUPPORT THE CHANNEL?
    💰 Patreon: / distrotube
    💳 Paypal: www.paypal.com...
    🛍️ Amazon: amzn.to/2RotFFi
    👕 Teespring: teespring.com/...
    SOCIAL PLATFORMS:
    🗨️ Mastodon: mastodon.techn...
    💬 IRC: irc://freenode #distrotube
    👫 Reddit: / distrotube
    📽️ LBRY: lbry.tv/$/invi...
    DT ON THE WEB:
    🕸️ Website: distrotube.com/
    🐿️ Gopherhole: gopher://distro.tube
    📁 GitLab: gitlab.com/dwt1
    🔊 Audio Podcasts: www.buzzsprout...
    FREE AND OPEN SOURCE SOFTWARE THAT I USE:
    🌐 Brave Browser - brave.com/dis872
    📽️ Open Broadcaster Software: obsproject.com/
    🎬 Kdenlive: kdenlive.org
    🎨 GIMP: www.gimp.org/
    🎵 Audacity: www.audacityte...
    💻 VirtualBox: www.virtualbox...
    🗒️ Doom Emacs: github.com/hli...
    Your support is very much appreciated. Thanks, guys!

Комментарии • 138

  • @AQDuck
    @AQDuck 4 года назад +224

    I make my repos private because I'm ashamed of my code :D

    • @ah-oc6yv
      @ah-oc6yv 4 года назад +50

      Thank god I though I was the only one

    • @censoredterminalautism4073
      @censoredterminalautism4073 4 года назад +14

      I bet you think that you will do that eventually, when it's good enough to be seen by humans.

    • @xijinpingpong4426
      @xijinpingpong4426 4 года назад +7

      Exactly what I thought :D

    • @marcosgarcia8018
      @marcosgarcia8018 4 года назад +1

      good on you i guess
      doubt it's bad
      ive seen some pretty nasty shell code before

    • @theemacsen1518
      @theemacsen1518 4 года назад +1

      Lol same hahaha

  • @dkosmari
    @dkosmari 4 года назад +92

    I just rdiff-backup my whole home directory into my NAS. My memes folder is way more valuable than my config files.

    • @l0_0l45
      @l0_0l45 2 года назад +3

      I legit cried over losing memes than losing passwords when my system got corrupted.

  • @engageintellect
    @engageintellect 4 года назад +40

    Thank you to the producers of this show as well as Derek. I’ve learned so much from you and love the content.

    • @DistroTube
      @DistroTube  4 года назад +8

      Thanks for watching!

    • @juzujuzu4555
      @juzujuzu4555 4 года назад +2

      @@DistroTube Firefox 80 is now finally having VA-API support on Linux, making it really fast and efficient. I have heard countless people say that they would use Firefox, but it's too slow, it takes too much CPU and it drains battery, ramps up fans etc. but this is now history. Please do a video about Firefox 80, the importance of Firefox as it's the only thing that is keeping Google in check to fully own the Internet, and how it's now fast because video is accelerated on GPU.

  • @thierrybo6304
    @thierrybo6304 4 года назад +27

    Stow + git = the perfect dot files handler.

  • @marcosgarcia8018
    @marcosgarcia8018 4 года назад +41

    "I think a lot of people put learning git off for a long time"
    me: *sweats nervously*

    • @abdullahalmasri612
      @abdullahalmasri612 3 года назад +2

      this is me until my prof told me to make a small 10 minute representation about github because i said "i know what is github! people put their code their and stuff"
      sweat level 100000

  • @michaelkrailo5725
    @michaelkrailo5725 5 месяцев назад

    Between this video and the older one on using the config alias to utilize a git --bare repo, it inspired me to dig deeper into using git and I'm real glad I did as I have put off learning version control for a long time for my other software projects. This finally got me over the initial hump of learning the basics on GitLab. There are some really good tutorials out there that fill in more of what git actually does, so I'm glad I stumbled on these videos.

  • @noahwilliams8918
    @noahwilliams8918 4 года назад +9

    Really good video DT! Concise and shows new Git users around - been looking for a video like this to help train new devs.
    One small amendment I'd make for security: For the SSH encryption type, these days it's a good idea to choose ECDSA because of some structural vulnerabilities found in RSA that have made it crackable with (contextually) low compute power.

    • @DistroTube
      @DistroTube  4 года назад +2

      Thanks for the info on encryption. I need to update my keys then! :D

  • @sssanjaya
    @sssanjaya 4 года назад +6

    Thank you for taking Linux users to next level.. awesome journey learning Linux in depth

  • @marioschroers7318
    @marioschroers7318 4 года назад +2

    Opened an account with Gitlab by the beginning of the year. I'm not a great admirer of cloud stuff, but Gitlab is actually super useful. I keep my dotfiles, scripts, and wallpapers there. Actually, it saved me once to have my .zshrc backed up there.
    Sure, I tend to backup everything locally, but it also makes it easy to sync things on multiple computers without having to juggle USB devices or hard drives.
    I'm also about to help someone transition from Windows to Linux. I'm sure I'll make use of one or another of my dotfiles on my Gitlab repo.
    However, I need to learn how to use ssh, since uploading files to Gitlab using the web interface really is a big pain.
    Thank you for this video!

  • @jajajajahahahahaja
    @jajajajahahahahaja 4 года назад +3

    Hi DT you uploaded this right when I got off work, nice!

  • @Nerdamania
    @Nerdamania 4 года назад +2

    This is one of the awesome videos I am subscribed to this channel for. No polarizing bs, just a great informative tutorial. :)

  • @indigowyrm
    @indigowyrm 3 года назад +1

    Thanks DT! this is a great primer on using git - well explained! I've also followed your git bare repository video and about to set it up with my dotfiles.

  • @SneedusFeedus
    @SneedusFeedus 6 месяцев назад

    Great basics run through, seems easier than I thought

  • @AliensInc.
    @AliensInc. 4 года назад

    I started using gitlab some months ago thanks to you and I found a web page that showed me how to do it but now I can't find that again so my dotfiles just laying there and by this video I thank you so I can get them back into my newly installed system. This was a perfect time to upload this, thanks DT :D

  • @BurakCYldz
    @BurakCYldz 4 года назад +4

    I keep my dotfiles in a usual git directory and symlink them to the necessary locations. Also have a bash script that handles all the sym linking after a reinstall :)

  • @taidee
    @taidee 4 года назад +3

    A great and high quality tutorial, as usual DT, thank you.

  • @navneetvikramtey
    @navneetvikramtey 4 года назад +3

    I was already doing it today, and thought will continue it at 12am, its 11pm rn so yeah good timing.

  • @AnzanHoshinRoshi
    @AnzanHoshinRoshi 4 года назад +4

    Thank you, Derek. I always have local backups, and on Dropbox and G Drive. But i've been thinking of (but not getting on with) using Github.

    • @DistroTube
      @DistroTube  4 года назад +7

      Keeping a Dropbox or Nextcloud account is good too because, even if you use Github/Gitlab, there are some things that contain sensitive information in plain text that you wouldn't want in public repo.

  • @boredguy5531
    @boredguy5531 4 года назад +2

    Git branch can be useful when you use multiple OS. In my case I have "dotfiles-linux" and "dotfiles-macos" branches on the same repo. When I need to reinstall any of my machines, I just clone my repo and specify the proper branch to be pulled: git clone ..., git checkout bla bla bla, you get the idea. This way everything is much cleaner for example because my VIM config on linux is different than what I have on my mac. This is only small thing I came up with when using branch, I'm sure it can be used to do a lot more useful stuff.

  • @falenperez8690
    @falenperez8690 2 года назад

    Thanks for the helpful information. I learn something new every day watching your videos, I'm not a computer science type of person but learn I new skills and implementations through your content. starting to practice using vim at least an hour a day

  • @12Q46HPRN
    @12Q46HPRN 4 года назад +1

    OMG!
    Excellent git tutorial! Thank you so much. You made this SO MUCH clearer for me, and I am sure for countless others.
    If you could edit the title of the video, I would recommend adding something like "Beginning Git Tutorial." Just a thought.

  • @IvicaAnteski
    @IvicaAnteski 2 года назад +1

    thanks Derek!

  • @HaiNguyen-vu9cj
    @HaiNguyen-vu9cj 3 года назад +1

    Thank you very much.

  • @harryvendryes
    @harryvendryes 3 года назад

    Created an account at Gihub. Then discovered who owns Github. Deleted account and swam over to Gitlab.
    Thinking Ansible might be the best bet for my config backups, with the ability to automatically install onto any laptop connected to to the Internet. Also, the ability to automatically install programs, users etc. Looks like an amazing time saver.... after having spent an enormous amount of time setting it up :-)

  • @SimGunther
    @SimGunther 4 года назад

    Yet another bare repo tutorial. HOW EXCITING!

  • @gallitOo88
    @gallitOo88 2 года назад

    Thanks DT nice job !

  • @der_kloenk
    @der_kloenk 4 года назад +1

    I can recommend home-manager, it can install your Programms in the same step as dotfile management

  • @vi777x4
    @vi777x4 4 года назад +7

    This video came abut 20 hours to late, after a tragic rm -rf typo.
    At least I learned a lesson about backups and not being trigger happy when removing larger quantities of files. :

    • @kingburrito7773
      @kingburrito7773 4 года назад +5

      dude a couple weeks ago i forgot i was in root / and went rm -r .

    • @BurgerKingHarkinian
      @BurgerKingHarkinian 4 года назад +1

      @@kingburrito7773 Here's another fun idea: rm -rf "$(find / | shuf -n1)"

  • @andrewsalnikov438
    @andrewsalnikov438 4 года назад +1

    Great video, simple and clear about important things! However, as always, on this channel :-)

  • @n0kodoko143
    @n0kodoko143 4 года назад +9

    Oh the timing... I just nuked my init.vim file. Silver lining I had uploaded a copy to github, 2 weeks ago, and have it to where the minimal changes over the passed 2 weeks were still in the brain cache.

  • @TechWaltMD
    @TechWaltMD 2 года назад

    Great content. I would recommend making any repo private by default for safety. If you are writing code to share, then mark that public.

  • @marcs741
    @marcs741 4 года назад +1

    good video. Thanks Derek

  • @faye_isc
    @faye_isc 4 года назад +2

    THANK YOU !!!!!!!!! I FIIAAALLYY UNDERSTAND this

  • @dheerah
    @dheerah 4 года назад +1

    Thank you so much dt !!!

  • @ramonoxis
    @ramonoxis 4 года назад +1

    Thank you so very much for this.

  • @DennisvanVreeswijk
    @DennisvanVreeswijk 4 года назад +1

    Thanks voor the great examples

  • @SubterraneanChick
    @SubterraneanChick 3 года назад

    Would have loved this back in the day when I jumped around distrowatch, clicking and d/l live & base install ISOs to burn onto CDs, then USBflash.

  • @LarryDamba
    @LarryDamba 2 года назад

    Great video, I always enjoy your videos.

  • @Sound_.-Safari
    @Sound_.-Safari 4 года назад

    @distrotube you should use the maximum size RSA ssh key of 16384. No one ever recommends this, but it but it adds tons of security at extremely negligible cost for the user.

  • @jr_Linux
    @jr_Linux 2 года назад

    DT you'll be glad to know i finally figured it out. i got my gitlab setup atleast for starters took me awhile but something finally clicked :)
    i get the basics but when i went to try your other video on bare repo i got something wrong. not sure if you make a new folder and make the bare repo separate or if you make the repo like u showed in t his video and added the bare to this folder im kind of confused about that process

  • @MartinKuhlen
    @MartinKuhlen 2 года назад

    Thanks a lot. This was very helpful!

  • @jmcbri
    @jmcbri 2 года назад +1

    It looked to me that it's looking for the public key. The key you referred to is the private key.

  • @agh0x01
    @agh0x01 4 года назад +1

    Use NixOS and you can store your whole machine's system-level configuration in one or two files and rebuild it on the same or new hardware with one command.
    I think Guix has the same philosophy.

    • @MsDuketown
      @MsDuketown 4 месяца назад

      GUIX is a sledgehammer approach. Does it support Wayland? But yeah, with Stow and skel a pretty slim Linux Desktop start. Still, GUIX and Gnome desktop might even give a more smooth experience than,. let's say KDE Kvantum + Desktop.

  • @vwlouk2
    @vwlouk2 4 года назад

    Great tutorial. Thank you!

  • @YannMetalhead
    @YannMetalhead Год назад

    Good video.

  • @tur7le254
    @tur7le254 4 года назад +1

    for me i got some hard linking to my configs in a git directory i just have to remind myself to push them to git

  • @furiousfellow1583
    @furiousfellow1583 3 года назад

    "I dont distro hop much these days", sounds like something a distro hopper might say
    Jokes aside, great video, your tutorials are a blessing for beginners who want to get into tech stuff

  • @user-jq8tq6fk7d
    @user-jq8tq6fk7d 3 года назад

    If I'm ever migrate distro or reinstall my os, should I save the files inside .ssh? Once I copy the id_rsa.pub ssh key into GitLab, can I just run config push without the .ssh directory in my home directory?
    I'd also like to clarify that even said to use the key in id_rsa, GitLab recommends the id_rsa.pub instead, I'm new to using git (or "config" like in your git bare video) so I decided to use the public key like how GitLab recommended.

  • @gradientO
    @gradientO 3 года назад +1

    You forgot to add _c o d e o f c o n d u c t_

  • @romaric6022
    @romaric6022 4 года назад +1

    thanks a lot for those very helpful videos::::!!!!!!!!!!!!!!!!!!!

  •  4 года назад

    You can just put a bare repo on a server and push using git over SSH. GitLab is kinda overkill if you just want a place to push your things.

  • @starnice5559
    @starnice5559 4 года назад

    Thanks

  • @OG900Aero
    @OG900Aero 4 года назад

    Which better? Github or gitlab?

  • @32gigs96
    @32gigs96 4 года назад +8

    I can't be the only one that just uses github...

    • @jrhaven
      @jrhaven 4 года назад

      I use GitHub.

    • @_yuri
      @_yuri 4 года назад +1

      only 50 million users on there you might be the only one i am afraid 😳

    • @censoredterminalautism4073
      @censoredterminalautism4073 4 года назад +7

      Hello, users of Microsoft Github. Tell me why you love Microsoft so much. I don't get it, but I would like to understand your mindset for scientific reasons.

    • @atomskyjahid1533
      @atomskyjahid1533 4 года назад +2

      @@censoredterminalautism4073 GitHub has a huge amount of projects. The programs I use daily, such as bspwm, sxhkd, nnn, broot, picom etc., are also hosted there.

    • @TehGettinq
      @TehGettinq 4 года назад +1

      @@censoredterminalautism4073 we dont like microsoft but github is just more popular and has more project. You have more chances of ppl participating to your projects on github. Gitlab is (or atleast was) aimed at enterprises. It does suck that microsoft owns it now tho.

  • @amos660
    @amos660 2 года назад

    Does anyone know if gitlab can save and store ssh keys from the cli efficiently? I had to delete 6 github accounts today for this very reason.

  • @andref82
    @andref82 3 года назад +1

    Shouldn't the key placed on gitlab be the public key the id_rsa.pub , do not ever public give your private key.

  • @jackelofnar
    @jackelofnar 2 года назад

    Probably should of been expanded for new users e.g how to recover dotfiles via stow

  • @raptoress6131
    @raptoress6131 Год назад

    Great tutorial, other videos take an hour to explain the same things.

  • @yuvvrajkperson
    @yuvvrajkperson 2 года назад

    dt: I won't show my key
    dt: shows key 5 seconds later on the gitlab website anyway

  • @starnice5559
    @starnice5559 4 года назад

    How much storage they give?

  • @syrefaen
    @syrefaen 4 года назад

    witch commands is the best for updating a local repo when remote master has been updated?. Rebase from master?

    • @DistroTube
      @DistroTube  4 года назад +1

      Rebase is usually what you want.

  • @hughhe4209
    @hughhe4209 4 года назад +1

    So I just bought gitlab ultimate and hosted it on my pi4

  • @rwprime1
    @rwprime1 3 года назад

    I wonder if a person could fetch your wallpaper or whatever and then push it to my gitlab. In other words would that be an instance of using fetch.

  • @rc8467
    @rc8467 4 года назад

    Hello mate there's new tilling window distro duno if u review it bit called instant os hope u can review like to no ur thoughts on it

    • @rc8467
      @rc8467 4 года назад

      Sorry I just looked u did review it sorry

  • @Nerdamania
    @Nerdamania 4 года назад +1

    could you just upload your whole .config folder to git and make it private so that no private data gets exposed?

  • @thebtm
    @thebtm 4 года назад

    Readme.md can be in lower case on gitlab-ce

  • @dave7244
    @dave7244 4 года назад

    If you want a truly free license you would be using the WTFPL license.

  • @AcidiFy574
    @AcidiFy574 2 года назад

    Any desktop & mobile clients for GitLab????

  • @Emily-qy1gk
    @Emily-qy1gk 4 года назад

    I have distrohopped way too much without doing backups...

  • @sentinel9651
    @sentinel9651 4 года назад

    Why did you choose GitLab over other services?

    • @DistroTube
      @DistroTube  4 года назад +3

      GitLab is one of the largest and most respectable...especially in the freedom dimension ( as Stallman would say). GitHub, owned by Microsoft, still has too much of its stuff closed source. I choose the more "open" solutions when it makes sense to do so.

  • @faye_isc
    @faye_isc 4 года назад +1

    GUYS, try 0.75 speed . He sounds *SO FKIN DRUNK AND DEPRESSED* 😂😂😂😂😂😂😂😂

    •  4 года назад

      😂

  • @amiwatchesyt
    @amiwatchesyt 4 года назад

    You can modify the timeouts for the password www.linux.com/training-tutorials/beginning-git-and-github-linux-users/

  • @mulljacob
    @mulljacob 4 года назад

    How is this different or better than backing up to another disk with Timeshift?

    • @jackbijou
      @jackbijou 4 года назад +1

      By default your home directory is omitted from the TimeShift backup. I think you can change this, but I have never tried it.

    • @mulljacob
      @mulljacob 4 года назад

      @@jackbijou Yes home directories are omitted by default but it's a simple click to include them.

    • @TehGettinq
      @TehGettinq 4 года назад

      Its different because its not on a disk? Your idea implies you need another disk. Using git and github/lab i can be on a beach in north korea and access my files without bringing a disk with me.

    • @mulljacob
      @mulljacob 4 года назад

      @@TehGettinq OK, why not a cloud service then? Doesn't Microsoft own Git so why not just buy some cloud storage from them? I'm just wondering why a normal Linux user would use Git as essentially a backup service. ..just trying to get the whole premise straight, in my head.

    • @TehGettinq
      @TehGettinq 4 года назад

      @@mulljacob you could do that but its much uglier. Like you could upload your dotfiles on google drive (i guess you meant something like that) but then you couldnt update and access them easily using your terminal. Git is simple once u understand the basics and its super convinient. But sure there are other way to do things, but someone who modifies alot of things often and wants to have these files stores remotely well git is probably the better choice.

  • @majorgamer4610
    @majorgamer4610 3 года назад

    fatal: not a git repository (or any of the parent directories): .git

  • @Tn5421Me
    @Tn5421Me 2 года назад

    > uses private repository for his dotfiles

  • @MyurrDurr
    @MyurrDurr 4 года назад

    you accidently showed your key on the gitlab accounts settings page

    • @mithrial1
      @mithrial1 4 года назад +1

      That's the public key. There is no harm in showing that.

    • @MyurrDurr
      @MyurrDurr 4 года назад

      @@mithrial1 ooohhh

  • @zweitlander874
    @zweitlander874 4 года назад +2

    :)

  • @ryanvelbon
    @ryanvelbon 3 месяца назад

    unpopular opinion:
    git should be learnt before learning a programming language
    One can practice version controlling html, yaml, markdown, txt files etc.

  • @dabuge
    @dabuge 4 года назад

    Edit the video. We can see your key made 1hour ago on 19:43.

    • @ricknaam5658
      @ricknaam5658 4 года назад +1

      Leaking the public key isnt a problem, the private key is what is actually used for authentication and should be kept hidden.

    • @folkrav
      @folkrav 4 года назад

      @@ricknaam5658 true.

  • @ohio2440
    @ohio2440 4 года назад

    I back my code up using github.

  • @TheBlueThird
    @TheBlueThird 4 года назад +1

    Get into Git 😂😂...

  • @sylwesterrak9802
    @sylwesterrak9802 4 года назад +1

    !!!ALERT!!! Remove your advice. You should never ever share your private key! What you public is 'public' key. Never ever share your private key _ not in secret mode or ... anything. That's how asymetric encryption work.

    • @DistroTube
      @DistroTube  4 года назад

      I have no idea what you are talking about. Nowhere in this video or any other video of mine have I ever said that anyone should share a "private" key. The very term "private key" suggests that it shouldn't be shared with anyone.

    • @sylwesterrak9802
      @sylwesterrak9802 4 года назад

      @@DistroTube Maybe I'm just jumpy but you showed your .shh dir and adviced to copy content of private key to ... Someone could read it like that. Please don't take it wrong. I admire your work. Peace :-)

  • @ambassadorofpain1
    @ambassadorofpain1 4 года назад +2

    >2020
    >still using RSA
    oh brother

  • @ad_sidera_virgines
    @ad_sidera_virgines 4 года назад +1

    I think we shouldn't talk that much about all the git managing commands (add, push, commit, etc) to beginners who just wanna install some software. I'm not a linux/git user for a long time, and I was looking after several projects on github but all the tutorials and cheatsheets I found for git were about what I call git *managing*.
    It would've been way better if someone just told me "use 'git clone url' to download the repository"

    • @TehGettinq
      @TehGettinq 4 года назад +1

      Are you from qc? And yes agreed sometimes ressources arent too noob friendly, probably because they are written by non noobs who dont remember what it was like to learn.

    • @ad_sidera_virgines
      @ad_sidera_virgines 4 года назад

      @@TehGettinq what do you mean by "qc" ?

  • @OveRaDaMaNt
    @OveRaDaMaNt 3 года назад

    Kind of a useless video. Came here hoping to learn how to push the files from my home directory into my repo without git complaining about them being "outside of the repository". Only learned here that that is possible somehow but not how to actually do it.

  • @boriska91m
    @boriska91m 4 года назад +1

    Dotfiles sucks. Try Nix + home-manager

  • @mihir.mishra
    @mihir.mishra 4 года назад

    Postpone JEE NEET

  • @alexandershendi7428
    @alexandershendi7428 4 года назад +1

    Well I just put .tar.gz files on that nice yellow USB pen drive that I always carry in my trouser pocket. But then I'm just a Boomer...
    And allergic to git to boot.