13 Advanced (but useful) Git Techniques and Shortcuts

  ΠŸΠ΅Ρ€Π΅Π³Π»ΡΠ΄Ρ–Π² 875,706

Fireship

Fireship

Π”Π΅Π½ΡŒ Ρ‚ΠΎΠΌΡƒ

Productive programmers tend to be really good at Git. Take a look at 13 advanced git tips and tricks to supercharge your development workflow. πŸ”₯ Enroll in the New Full Git Course fireship.io/courses/git/
πŸ’° Extra big 40% discount (expires in 1 week). Use code: oqBi9fWv
Upgrade to PRO at fireship.io/pro
#git #learntocode #tips
πŸ”— Resources
The Full Git & GitHub Course fireship.io/courses/git/
Git Docs git-scm.com/
Git in 100 Seconds β€’ Git Explained in 100 S...
πŸ“š Chapters
00:00 Git Started
00:59 Combine add & commit
01:20 Aliases
01:38 Amend
02:03 Force Push
02:24 Revert
02:47 Codespaces
03:21 Stash
04:05 PC Master Branch
04:27 Pretty Logs
04:51 Bisect
05:14 Autosquash
06:18 Hooks
06:58 Destroy Things
07:41 Checkout to Last
🎨 My Editor Settings
- Atom One Dark
- vscode-icons
- Fira Code Font
🏷️ Topics Covered
- Git Shortcuts
- Github Codespaces Cloud VSCode
- Software Version Control
- Dealing with Merge Conflicts
- Git Merge & Rebase
- How to Squash Commits

ΠšΠžΠœΠ•ΠΠ’ΠΠ Π†: 1 300
@djordjenikolic6560
@djordjenikolic6560 2 Ρ€ΠΎΠΊΠΈ Ρ‚ΠΎΠΌΡƒ
The guy who created git seems really smart. He should create a kernel someday.
@DevAmateur
@DevAmateur 2 Ρ€ΠΎΠΊΠΈ Ρ‚ΠΎΠΌΡƒ
Am I a certificated geek to understand this joke? :D
@ThotsAndPrayers
@ThotsAndPrayers 2 Ρ€ΠΎΠΊΠΈ Ρ‚ΠΎΠΌΡƒ
Yeah, and he could call it something based on his name… something like Linuz or Linuks or something. πŸ€”
@MASTERISHABH
@MASTERISHABH 2 Ρ€ΠΎΠΊΠΈ Ρ‚ΠΎΠΌΡƒ
@@ThotsAndPrayers Lunix would be better. People would find different reasons... One could say Lol Unix πŸ˜…
@TOn-fx2gr
@TOn-fx2gr 2 Ρ€ΠΎΠΊΠΈ Ρ‚ΠΎΠΌΡƒ
@@DevAmateur the guy is linus trovald and he created a kernel called linux
@DevAmateur
@DevAmateur 2 Ρ€ΠΎΠΊΠΈ Ρ‚ΠΎΠΌΡƒ
@@TOn-fx2gr lmao, I said that I understood the joke
@vim_programar
@vim_programar 2 Ρ€ΠΎΠΊΠΈ Ρ‚ΠΎΠΌΡƒ
Good tip, do not use -force, this will make all your coworkers hate you, use -force-with-lease, this will only allow you to push the code if there are no conflicting changes with the current parent branch πŸ‘Œ
@Terrain2
@Terrain2 2 Ρ€ΠΎΠΊΠΈ Ρ‚ΠΎΠΌΡƒ
If you don't want your coworkers to hate you, then you should just git-blame-someone-else so they'll have that someone else instead
@jayjaayjaaay94
@jayjaayjaaay94 2 Ρ€ΠΎΠΊΠΈ Ρ‚ΠΎΠΌΡƒ
I usually use `git push origin +feature/name` it only push the current working branch which is usually we wants to force change
@ErikHuizinga
@ErikHuizinga 2 Ρ€ΠΎΠΊΠΈ Ρ‚ΠΎΠΌΡƒ
@@bugs389 pfwl
@alextheheck
@alextheheck 2 Ρ€ΠΎΠΊΠΈ Ρ‚ΠΎΠΌΡƒ
came here for this, sound advice that more people should know about
@ClAddict
@ClAddict 2 Ρ€ΠΎΠΊΠΈ Ρ‚ΠΎΠΌΡƒ
We block force on Main for all but a few admins in the rare case a build system breaks underneath us which requires code changes to fix. Everything else requires a PullRequest.
@leoaso6984
@leoaso6984 2 Ρ€ΠΎΠΊΠΈ Ρ‚ΠΎΠΌΡƒ
Important note: "git commit -a" will only automatically add changes to files git is already tracking. If you create a new file, you still need to "git add" it.
@pesterenan
@pesterenan 2 Ρ€ΠΎΠΊΠΈ Ρ‚ΠΎΠΌΡƒ
Thanks, I tried to be all smart and use this new -am and now I am surprised to see none of my new files on the online repo...
@mikeguantonioify
@mikeguantonioify 2 Ρ€ΠΎΠΊΠΈ Ρ‚ΠΎΠΌΡƒ
Usually I favor git add - - update This allows you to only commit changed files added to the repo.
@EverAfterBreak2
@EverAfterBreak2 2 Ρ€ΠΎΠΊΠΈ Ρ‚ΠΎΠΌΡƒ
I can confirm this
@mgarcqnohaydisp
@mgarcqnohaydisp 2 Ρ€ΠΎΠΊΠΈ Ρ‚ΠΎΠΌΡƒ
Yeah, I'm all in for old-school in this aspect. Adding files manually first and committing in a separate command. As stated in the video "sometimes going fast lead to mistakes"
@dgmstuart
@dgmstuart 2 Ρ€ΠΎΠΊΠΈ Ρ‚ΠΎΠΌΡƒ
I have an alias set up: gcad=β€œgit add .; git commit -v” Occasionally I’ll end up staging stuff I don’t expect to, but using -v means I usually spot my mistake. VERY occasionally I end up committing something I didn’t mean to, but I’m confident enough with git to edit the commit before the PR gets merged, so for me the trade off is worth it.
@technikhil314
@technikhil314 2 Ρ€ΠΎΠΊΠΈ Ρ‚ΠΎΠΌΡƒ
alias uncommit="git reset HEAD~1" alias recommit="git commit --amend --no-edit" alias editcommit="git commit --amend" These are my all time favorite aliases
@alpers.2123
@alpers.2123 2 Ρ€ΠΎΠΊΠΈ Ρ‚ΠΎΠΌΡƒ
git config --global alias.magic '! git add . >/dev/null 2>&1 && git status --porcelain | git commit -F -'
@nicolasa.bermellferrer8025
@nicolasa.bermellferrer8025 2 Ρ€ΠΎΠΊΠΈ Ρ‚ΠΎΠΌΡƒ
Thank you!
@radadadadee
@radadadadee 2 Ρ€ΠΎΠΊΠΈ Ρ‚ΠΎΠΌΡƒ
try this one alias lg = log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)%Creset' --abbrev-commit
@IshanKashyap001
@IshanKashyap001 ΠœΡ–ΡΡΡ†ΡŒ Ρ‚ΠΎΠΌΡƒ
​@@radadadadee Is this the masochist version of "git log --oneline -a --graph"?
@technomunk
@technomunk 2 Ρ€ΠΎΠΊΠΈ Ρ‚ΠΎΠΌΡƒ
Instead of showing "--force" flag you should default to "--force-with-lease" which will avoid pushing the code if it would overwrite something you didn't anticipate (coworker's code)
@henriquematias1986
@henriquematias1986 2 Ρ€ΠΎΠΊΠΈ Ρ‚ΠΎΠΌΡƒ
omg! that should be the default option for force : D
@andresreyes8509
@andresreyes8509 2 Ρ€ΠΎΠΊΠΈ Ρ‚ΠΎΠΌΡƒ
does that flag have a short version? like how --force is -f?
@technomunk
@technomunk 2 Ρ€ΠΎΠΊΠΈ Ρ‚ΠΎΠΌΡƒ
@@andresreyes8509 no, not as far as I'm aware unfortunately. You can always make an alias if you use it often enough.
@nrnjn8547
@nrnjn8547 Π Ρ–ΠΊ Ρ‚ΠΎΠΌΡƒ
cant that just be replaced by a simple git pull and then git push.... ??
@martiananomaly
@martiananomaly Π Ρ–ΠΊ Ρ‚ΠΎΠΌΡƒ
lmao that seems kinda useless because --force is usually used to overwrite someone else's code. Otherwise just pull the code and push normally.
@lbedoya13
@lbedoya13 2 Ρ€ΠΎΠΊΠΈ Ρ‚ΠΎΠΌΡƒ
3:21 ah yes, stash: "That's the code the project deserves, but not the one we need right now"
@Arrviasto
@Arrviasto 2 Ρ€ΠΎΠΊΠΈ Ρ‚ΠΎΠΌΡƒ
The most useful git technique I've learned is understanding how it works internally (what is a commit and how it is stored, that a branch is pretty much a pointer to a commit etc). This allows for much more flexibility when it comes to managing your local repo. At work I'm constantly juggling commits between local branches, mixing and squashing them as I need them to. There is no problem in running cherry-pick on a branch to get its' top commit or pushing your previous commit to remote while current one is not ready. And also reflog.
@atishayjain1141
@atishayjain1141 2 Ρ€ΠΎΠΊΠΈ Ρ‚ΠΎΠΌΡƒ
Can you make a video on this. I would love to learn from you. Because I am also facing the same issue and cherrypicking is so hard for me to maintain.
@electricathlete4299
@electricathlete4299 11 місяців Ρ‚ΠΎΠΌΡƒ
Can you please give me some insight on how it works internally please πŸ™
@BosonCollider
@BosonCollider 6 місяців Ρ‚ΠΎΠΌΡƒ
That's mostly a sign that git is a leaky abstraction imho
@LuLeBe
@LuLeBe 3 місяці Ρ‚ΠΎΠΌΡƒ
​@@BosonCollideris it an abstraction? To me it's a tool that makes it easier to copy code around and have messages and IDs attached to certain versions of it, instead of having separate folders for working on a new feature or so. There are some abstractions in the naming, yes, but even without all of them it's just a tool to avoid having tons of folders and a spreadsheet to know what's where.
@IshanKashyap001
@IshanKashyap001 ΠœΡ–ΡΡΡ†ΡŒ Ρ‚ΠΎΠΌΡƒ
​@@BosonColliderL take
@isheanesunigelmisi8400
@isheanesunigelmisi8400 2 Ρ€ΠΎΠΊΠΈ Ρ‚ΠΎΠΌΡƒ
Let's take a moment to appreciate how this guy drops amazing content every other day. St. Fireship
@thecashewtrader3328
@thecashewtrader3328 2 Ρ€ΠΎΠΊΠΈ Ρ‚ΠΎΠΌΡƒ
πŸ’“
@NomadicJulien
@NomadicJulien 2 Ρ€ΠΎΠΊΠΈ Ρ‚ΠΎΠΌΡƒ
git switch: move your current changes to another branch. I regularly work on the main branch and then switch those untracked changes to a new branch then I commit them. The perfect use case is when you just want to test something, but you're not sure it's worth it. > git switch -c''
@aquelecanaldohugo
@aquelecanaldohugo 2 Ρ€ΠΎΠΊΠΈ Ρ‚ΠΎΠΌΡƒ
I didn't know about that. I have been stashing my changes my whole life haha Thanks
@voyageruk2002
@voyageruk2002 2 Ρ€ΠΎΠΊΠΈ Ρ‚ΠΎΠΌΡƒ
So would you do. Work on main branch git checkout -b newbranch Then won't it automatically take you to new branch? Then have to go back to switch again? How does it work?
@aquelecanaldohugo
@aquelecanaldohugo 2 Ρ€ΠΎΠΊΠΈ Ρ‚ΠΎΠΌΡƒ
@@voyageruk2002 switch is a replacement for checkout. `git checkout -b` and `git switch -c` work the same. They created switch because checkout does more than just switching branches and now they are trying to make things more specific. To simplify the code base, I guess.
@thethirdtomas
@thethirdtomas 2 Ρ€ΠΎΠΊΠΈ Ρ‚ΠΎΠΌΡƒ
Yup. I use checkout -b Same results.
@andres154525452
@andres154525452 2 Ρ€ΠΎΠΊΠΈ Ρ‚ΠΎΠΌΡƒ
OMG THAT EXISTS??? WHAT A PAIN I HAD IN THE LAST COUPLE SPRINTS!
@svenvancrombrugge9073
@svenvancrombrugge9073 2 Ρ€ΠΎΠΊΠΈ Ρ‚ΠΎΠΌΡƒ
2:35 git revert does not "got back to the original state"; that's checkout / reset. git revert creates a new commit with the opposing changes effectively reverting the reverted commit (hence the name).
@charlesm.2604
@charlesm.2604 2 Ρ€ΠΎΠΊΠΈ Ρ‚ΠΎΠΌΡƒ
Thanks bro
@augustday9483
@augustday9483 2 Ρ€ΠΎΠΊΠΈ Ρ‚ΠΎΠΌΡƒ
Revert is what you want to use if the commit is already pushed to the remote. Reset is for if you haven't pushed yet.
@viacheslavromanov3098
@viacheslavromanov3098 2 Ρ€ΠΎΠΊΠΈ Ρ‚ΠΎΠΌΡƒ
Yes he mentioned that
@Dmitri_Ivanovich
@Dmitri_Ivanovich 2 Ρ€ΠΎΠΊΠΈ Ρ‚ΠΎΠΌΡƒ
He said "without removing the original commit". How else would you "go back to the original state [...] without removing the original commit"? The only way is to create a new commit. So creating a new commit is implied here and you comment is superfluous.
@orkhepaj
@orkhepaj 2 Ρ€ΠΎΠΊΠΈ Ρ‚ΠΎΠΌΡƒ
@@Dmitri_Ivanovich by deleting last commit obviously
@gesit7120
@gesit7120 2 Ρ€ΠΎΠΊΠΈ Ρ‚ΠΎΠΌΡƒ
git bisect blew my mind. I don't think I will need it in the future, but I love that this functionality exists
@christoferberruzchungata2722
@christoferberruzchungata2722 2 Ρ€ΠΎΠΊΠΈ Ρ‚ΠΎΠΌΡƒ
This is heavily used when your code has tests and automated jobs. If you have Travis or Jenkins that run tests frequently, this feature allows to figure out which commit introduced a bug that it’s causing failures
@krzyczak
@krzyczak Π Ρ–ΠΊ Ρ‚ΠΎΠΌΡƒ
You can also run it automatically by providing a script with exit vode 0 for success and non-zero exit code for failure and it will mark all your commits good or bad based on that automatically
@TheBoab400
@TheBoab400 2 Ρ€ΠΎΠΊΠΈ Ρ‚ΠΎΠΌΡƒ
I don't watch Fireship videos that often, but when I do they always blow my mind. Like, I need to watch them over & over to absorb all the things that are in them. Thank you so much for this, we developers need to master GIT for sure.
@stoef
@stoef 2 Ρ€ΠΎΠΊΠΈ Ρ‚ΠΎΠΌΡƒ
The quality on your videos is insane. The voiceover is amazingly clear and nice to listen to. The topics touched on are explained really well The graphics are on point.. Amazing stuff!!
@jayjolupoi88891
@jayjolupoi88891 2 Ρ€ΠΎΠΊΠΈ Ρ‚ΠΎΠΌΡƒ
IKR, so undersubscriber
@shutanovac
@shutanovac 2 Ρ€ΠΎΠΊΠΈ Ρ‚ΠΎΠΌΡƒ
TBH the voiceover sounds almost like Microsoft Sam. I am wandering whether he automated the voice track by concatenating prerecorded word samples
@Mitchyugan
@Mitchyugan 7 місяців Ρ‚ΠΎΠΌΡƒ
Nah, the guy is good fr
@troythompson2
@troythompson2 2 Ρ€ΠΎΠΊΠΈ Ρ‚ΠΎΠΌΡƒ
This was perfect Jeff. Being a pro member has really paid off. Keep up the great content my guy
@RobertBrunhage
@RobertBrunhage 2 Ρ€ΠΎΠΊΠΈ Ρ‚ΠΎΠΌΡƒ
Amazing video once again! --force-with-lease is another awesome --force flag that reduces some of the risks regarding overwriting others changes 😎
@MrAyush98
@MrAyush98 2 Ρ€ΠΎΠΊΠΈ Ρ‚ΠΎΠΌΡƒ
That bonus tip in the end blew my mind!! The others you come across whenever you Google issues you have with git. But that last one saves so much time especially on terminals that don't have autocomplete.
@Sam-qn4ly
@Sam-qn4ly 2 Ρ€ΠΎΠΊΠΈ Ρ‚ΠΎΠΌΡƒ
Master will always be my main branch, It’s the master copy.
@philipoakley5498
@philipoakley5498 2 Ρ€ΠΎΠΊΠΈ Ρ‚ΠΎΠΌΡƒ
Nah, the master 'copy' (oxymoron) is on someone else's server (Github?). Git's called a distributed VCS for a reason. As long as you have the same hash, you have the same Mona Lisa! PS the correct historical term should have been a slave copy, based on slave clocks, but folks back then went with the 'master' figure of speech
@Kevin-jc1fx
@Kevin-jc1fx 2 Ρ€ΠΎΠΊΠΈ Ρ‚ΠΎΠΌΡƒ
Apparently, using the word master anywhere in your code or other tools is now considered as a reference to slavery. If you still have a branch in any of your repos called master, then congratulations you are racist. πŸ˜‚ Welcome to the inclusive and diversified kingdom of Woketopia πŸ˜‚πŸ˜‚πŸ˜‚
@nromancarcamo
@nromancarcamo 2 Ρ€ΠΎΠΊΠΈ Ρ‚ΠΎΠΌΡƒ
I am always using master even in new projects.
@philipoakley5498
@philipoakley5498 2 Ρ€ΠΎΠΊΠΈ Ρ‚ΠΎΠΌΡƒ
@@Kevin-jc1fx Most folks simply don't know where the usage comes from. There is a distinction between unique masterpieces created by master craftsmen (such as the Mona Lisa), or the original ship's drawing of Titanic, and forced perfect replication, originally conceived to drive slave clocks from a master pendulum. The original reference is discussed in [1] R. Eglash, β€œBroken Metaphor: The Master-Slave Analogy in Technical Literature,” Technology and Culture, vol. 48, no. 2, pp. 360-369, 2007, doi: 10.1353/tech.2007.0066 where the 'master' analogy was used directly to call up the idea of slave copies. Given that perfect replication/copying is the hallmark of software storage, it fits the latter description better than the former. Learning takes time.
@mok6034
@mok6034 2 Ρ€ΠΎΠΊΠΈ Ρ‚ΠΎΠΌΡƒ
@@philipoakley5498 I guess it does not matter, nobody should be force to use "main", master is fine so it make no sens to change it just because someone want to see his ideologie in it
@marco.garofalo
@marco.garofalo 2 Ρ€ΠΎΠΊΠΈ Ρ‚ΠΎΠΌΡƒ
One operation that I use quite a lot is "git add -p", which basically allows me to review each piece of code I changed/added/deleted in order to have more granular control over what I want to include in the next commit, and maybe squash the changes I didn't include, for later.
@nolanfaught6974
@nolanfaught6974 6 місяців Ρ‚ΠΎΠΌΡƒ
I add -p to stashes often because I’ll change different components in my code and sometimes I need to filter changes out of the same files
@bruhgamer317
@bruhgamer317 2 Ρ€ΠΎΠΊΠΈ Ρ‚ΠΎΠΌΡƒ
'senpai' is the best alternative to 'master'
@vforsh
@vforsh 2 Ρ€ΠΎΠΊΠΈ Ρ‚ΠΎΠΌΡƒ
I have renamed all my master branches to slave-owner
@skwisgaarskwigelf331
@skwisgaarskwigelf331 2 Ρ€ΠΎΠΊΠΈ Ρ‚ΠΎΠΌΡƒ
@@vforsh Based
@abdoufma
@abdoufma 2 Ρ€ΠΎΠΊΠΈ Ρ‚ΠΎΠΌΡƒ
'goshujin-sama' is where it's at for me
@Terrain2
@Terrain2 2 Ρ€ΠΎΠΊΠΈ Ρ‚ΠΎΠΌΡƒ
git push senpai --force hmm, i wouldn't wanna forcefully push my senpai
@tictac1020
@tictac1020 2 Ρ€ΠΎΠΊΠΈ Ρ‚ΠΎΠΌΡƒ
This is the only acceptable alternative to master.
@ezkymos
@ezkymos 2 Ρ€ΠΎΠΊΠΈ Ρ‚ΠΎΠΌΡƒ
6:55 there's also the python pre-commit to check coding style with clang-format before commit. Very useful to be sure the remote only have clean code
@ViieeS
@ViieeS 2 Ρ€ΠΎΠΊΠΈ Ρ‚ΠΎΠΌΡƒ
04:05 master branch renaming is so stupid πŸ€¦πŸ»β€β™‚οΈ
@DevAmateur
@DevAmateur 2 Ρ€ΠΎΠΊΠΈ Ρ‚ΠΎΠΌΡƒ
Extremely well explained video and added new stuff I did not know. The master rename to main is the stupidest thing I have ever felt in person about this new vibe of racism and sexism. It is ridiculous.
@sheepy0125
@sheepy0125 2 Ρ€ΠΎΠΊΠΈ Ρ‚ΠΎΠΌΡƒ
what the hell? i gotta look into this master/main branch rename
@ibrahimomer9263
@ibrahimomer9263 2 Ρ€ΠΎΠΊΠΈ Ρ‚ΠΎΠΌΡƒ
No one is forcing you to do anything (hopefully anyway). However, when starting new projects, it really doesn't matter what you name your main branch, so why not go with the least controversial one?
@mormatus
@mormatus 2 Ρ€ΠΎΠΊΠΈ Ρ‚ΠΎΠΌΡƒ
@@ibrahimomer9263 probably because not everyone wants to feel being influenced by snowflakes
@armynyus9123
@armynyus9123 2 Ρ€ΠΎΠΊΠΈ Ρ‚ΠΎΠΌΡƒ
​@@ibrahimomer9263 Because at a certain point, you have to say STOP. Otherwise this bullshit will go on until we cannot communicate anymore w/o constant fear of hitting the next trap. In my country, Germany, the language is being completely demolished meanwhile... Think for a minute: Do you really believe the word 'master', especially in the absence of a 'slave' as here with git, did hurt a certain group of people so much, that they gathered together and started lobbying at microsoft, for their just case? So that microsoft bent, because the pressure from that group was so high, that they decided to skip the word master in github's default repo settings? If you believe that, I would like to know who those people were and how they started their campaign for their cause. Face it: That group does not exist. Nobody, not a single person, is *honestly* being insulted by git using the word master for its default branch. Just like not a single woman in Germany is insulted by the word Wissenschaftler (scientiest), which we may not use any more. You will HAVE to realize that this stuff is coming NOT from bottom up. It's coming top down, upon us. Then ask youself why, whats the reason. *Why* is this being pushed top down? Invest half a day - You'll find the answer easily.
@sm5172
@sm5172 2 Ρ€ΠΎΠΊΠΈ Ρ‚ΠΎΠΌΡƒ
@@ibrahimomer9263 Because the whole β€˜controversy’ is idiotic.
@mateustymoniuk
@mateustymoniuk 2 Ρ€ΠΎΠΊΠΈ Ρ‚ΠΎΠΌΡƒ
Great video! Even though I've worked with git for some time, there are some commands that I didn't know that would make my life easier, so thanks for that!
@ruturajnawale10
@ruturajnawale10 Π Ρ–ΠΊ Ρ‚ΠΎΠΌΡƒ
This is such a well explained and clean video! Everything to the point.πŸ‘
@AdarshSingh-qd6mq
@AdarshSingh-qd6mq 2 Ρ€ΠΎΠΊΠΈ Ρ‚ΠΎΠΌΡƒ
You did awesome, In short span of time you deliver awesome content...
@kreemcat
@kreemcat 2 Ρ€ΠΎΠΊΠΈ Ρ‚ΠΎΠΌΡƒ
Bookmarking this vid because I'm sure I need to rewatch it sooner or later LOL
@vaisakhkm783
@vaisakhkm783 2 Ρ€ΠΎΠΊΠΈ Ρ‚ΠΎΠΌΡƒ
I just made a personal playlist to just book mark his videos lol Everything is gold in this channel
@TheSvs1
@TheSvs1 2 Ρ€ΠΎΠΊΠΈ Ρ‚ΠΎΠΌΡƒ
Another pragmatic, useful and time efficient video. Thanks!
@pavanbhadaja8859
@pavanbhadaja8859 2 Ρ€ΠΎΠΊΠΈ Ρ‚ΠΎΠΌΡƒ
I love your content and video style. Best part for me is how you use gifs that perfectly describes what you are talking about.
@riskingeuphoria
@riskingeuphoria 2 Ρ€ΠΎΠΊΠΈ Ρ‚ΠΎΠΌΡƒ
I feel like these videos are someone watching how shit I am and prodding me with encouragement. like "here you go little monkey, use this hammer to open that coconut you have been hitting with your head for a few hours"
@thisisneeraj7133
@thisisneeraj7133 2 Ρ€ΠΎΠΊΠΈ Ρ‚ΠΎΠΌΡƒ
git cherrypick is also useful when we have to merge a specific commit im another branch to our Say main branch by directly referencing the needed commit and the new added commit is same as that commit in that branch from where it got picked but with a completely new commit id.
@testusercompany5055
@testusercompany5055 2 Ρ€ΠΎΠΊΠΈ Ρ‚ΠΎΠΌΡƒ
git cherrypick is an underrated feature of git.
@thisisneeraj7133
@thisisneeraj7133 2 Ρ€ΠΎΠΊΠΈ Ρ‚ΠΎΠΌΡƒ
Yeah
@studogYT
@studogYT 11 місяців Ρ‚ΠΎΠΌΡƒ
`git cherrypick -x` always.
@kzoeps
@kzoeps 2 Ρ€ΠΎΠΊΠΈ Ρ‚ΠΎΠΌΡƒ
git work trees has also been really handy for me. Having two branches up on the ide has helped me with context switches.
@Vietnamkid1993
@Vietnamkid1993 2 Ρ€ΠΎΠΊΠΈ Ρ‚ΠΎΠΌΡƒ
This is the video I needed! I spent several work hours trying to fix a committed bug.
@luke5100
@luke5100 7 місяців Ρ‚ΠΎΠΌΡƒ
Here’s another tip. You can use the stage strategically. Say you make a bunch of changes to implement a feature, you forgot to come up for air during your coding fury and realistically the changes should be grouped into a few logical commits so your coworker has an easier time doing your PR review. Add each set of changes into the stage, commit stage, rinse and repeat until you have a handful of well organized and thoughtful commits
@Qrzychu92
@Qrzychu92 2 Ρ€ΠΎΠΊΠΈ Ρ‚ΠΎΠΌΡƒ
sample usage of git hooks: you can make it extract a Jira ticket number from branch name and prepend it to the commit message automatically, so that when you merge branches, you can track all tickets that were merged just by looking at the commit message of the merge
@vizunaldth
@vizunaldth 2 Ρ€ΠΎΠΊΠΈ Ρ‚ΠΎΠΌΡƒ
Timing couldn’t be better, thx!
@SzTz100
@SzTz100 11 місяців Ρ‚ΠΎΠΌΡƒ
Been using Git for almost a decade, I didn't know most of you shortcuts. Thanks.
@nitroflap
@nitroflap 2 Ρ€ΠΎΠΊΠΈ Ρ‚ΠΎΠΌΡƒ
Sometimes, especially when someone's commit might overwrite the changes you did, removed something, etc, etc, you might wanna do a git rebase on another branch. It helps to just make your branch on top of that one without any consequences. But we need to be careful with it, since it can really mess up everything.
@Fireship
@Fireship 2 Ρ€ΠΎΠΊΠΈ Ρ‚ΠΎΠΌΡƒ
That is good advice, I mention that in the full course.
@nitroflap
@nitroflap 2 Ρ€ΠΎΠΊΠΈ Ρ‚ΠΎΠΌΡƒ
@@Fireship Glad you liked it! Looking forward to that
@buntysingh7315
@buntysingh7315 2 Ρ€ΠΎΠΊΠΈ Ρ‚ΠΎΠΌΡƒ
Its good practice to make a backup of your current branch and then rebase it with main/yourbranch.. learnt it the hard way
@nitroflap
@nitroflap 2 Ρ€ΠΎΠΊΠΈ Ρ‚ΠΎΠΌΡƒ
@@buntysingh7315 same
@kaleidea5538
@kaleidea5538 2 Ρ€ΠΎΠΊΠΈ Ρ‚ΠΎΠΌΡƒ
@@Fireship I'm sorry for off-topic, don't know other way to contact... My top-level comment about the long list of Git GUIs seems to disappear, is it caught by youtube's spam filter, by any chance?
@ChrisHaupt
@ChrisHaupt 2 Ρ€ΠΎΠΊΠΈ Ρ‚ΠΎΠΌΡƒ
"git checkout -" was a mic drop moment. Blew my mind
@MPXVM
@MPXVM 2 Ρ€ΠΎΠΊΠΈ Ρ‚ΠΎΠΌΡƒ
there's also a "git checkout -- ." to reverse changes not yet committed if changes are not needed for later, otherwise stash is the way
@timmy111
@timmy111 2 Ρ€ΠΎΠΊΠΈ Ρ‚ΠΎΠΌΡƒ
The same thing works with cd. "cd -" to go back to the previous directory.
@sanderd17
@sanderd17 2 Ρ€ΠΎΠΊΠΈ Ρ‚ΠΎΠΌΡƒ
Some nice tips. I didn't know named stashes, will certainly use them in the future. And the 'checkout -' will also be a time saver.
@Vicer_Exciser
@Vicer_Exciser 2 Ρ€ΠΎΠΊΠΈ Ρ‚ΠΎΠΌΡƒ
Bro!! Having the browser-based VS Code editor right there in repo is a game changer!! Blew my mind 🀯
@pavankeshavl856
@pavankeshavl856 2 Ρ€ΠΎΠΊΠΈ Ρ‚ΠΎΠΌΡƒ
There's one more handy command.. To revert a PR merge and avoid reverting every commit, simply revert the merge commit by using git revert merge_commit_id -m 1 Here 1 means stay on the main branch and revert the merged branch changes
@AleksandarT10
@AleksandarT10 2 Ρ€ΠΎΠΊΠΈ Ρ‚ΠΎΠΌΡƒ
Great video. I never understood Git in depth until i started using GitKraken. Having an UI is so more convinient and u can learn the things a lot quicker. Give it a shot and you will never go back.
@arjix8738
@arjix8738 2 Ρ€ΠΎΠΊΠΈ Ρ‚ΠΎΠΌΡƒ
I actually find gitkraken confusing, git is more easy to understand.
@mormatus
@mormatus 2 Ρ€ΠΎΠΊΠΈ Ρ‚ΠΎΠΌΡƒ
For me, it was exactly the other way around. I have a feeling that using a UI tool should be allowed only after you understand the git internals. But if you understand those, you won't bother yourself with using a UI tool - plain aliased commands are typically faster to type and execute, and bonus point - you are pretty sure what is going on. While with that that fancy tool you are left at the mercy of its authors.
@johnthetactician5139
@johnthetactician5139 2 Ρ€ΠΎΠΊΠΈ Ρ‚ΠΎΠΌΡƒ
I use the git graph extension in VSC along with using the built-in git source control viewer that VSC has
@neur303
@neur303 2 Ρ€ΠΎΠΊΠΈ Ρ‚ΠΎΠΌΡƒ
The most important thing for me was to learn how the git graph is built. Not the details but the structure of the commits in general. Close to all operations update that graph. Visualizing what these operations do was most helpful. I love git extensions.
@jonathanlevin7660
@jonathanlevin7660 2 Ρ€ΠΎΠΊΠΈ Ρ‚ΠΎΠΌΡƒ
I never used the interactive rebase to squash, but you can do it manually as well: Assuming last common commit in both master and your branch is f8324b, then: git rebase --onto master f8324b git reset --soft master git commit -m "Your squashed commit name" Works like a charm!
@arjuntt2604
@arjuntt2604 2 Ρ€ΠΎΠΊΠΈ Ρ‚ΠΎΠΌΡƒ
For the first time I knows most of the things that's explained in a video from this channel, Feels so proud, Ima wizard now. LoL
@shaderone07
@shaderone07 2 Ρ€ΠΎΠΊΠΈ Ρ‚ΠΎΠΌΡƒ
This might help... `Git switch -c ` create and checkout directly to the new branch.
@undefinedvariable8085
@undefinedvariable8085 2 Ρ€ΠΎΠΊΠΈ Ρ‚ΠΎΠΌΡƒ
I typically use `git checkout -b ` Many ways to git a cat I suppose.
@bradleyturek
@bradleyturek 2 Ρ€ΠΎΠΊΠΈ Ρ‚ΠΎΠΌΡƒ
Want to undo just some files? Try `git restore -SW `. `-S` unStages the file and `-W` undoes it in the Working directory.
@Imaltont
@Imaltont 2 Ρ€ΠΎΠΊΠΈ Ρ‚ΠΎΠΌΡƒ
Will also recommend tig (comes by default for git for windows afaik, installed separately for unix systems). Very nice tool for looking at the git log over just the log command.
@Kai-en2xs
@Kai-en2xs 2 Ρ€ΠΎΠΊΠΈ Ρ‚ΠΎΠΌΡƒ
if you cant remember the full name of a branch during checkout. put a letter then press tab, it will either autocomplete the branch name for you or it will lists all the branches starting with the prefix/letter you provided.
@ifelseprog
@ifelseprog 2 Ρ€ΠΎΠΊΠΈ Ρ‚ΠΎΠΌΡƒ
That's a common feature of terminals btw
@user-ux2kk5vp7m
@user-ux2kk5vp7m 2 Ρ€ΠΎΠΊΠΈ Ρ‚ΠΎΠΌΡƒ
@@ifelseprog completions are a shell feature, not a terminal feature
@ifelseprog
@ifelseprog 2 Ρ€ΠΎΠΊΠΈ Ρ‚ΠΎΠΌΡƒ
@@user-ux2kk5vp7m yes my bad
@theena
@theena 2 Ρ€ΠΎΠΊΠΈ Ρ‚ΠΎΠΌΡƒ
2:45 lol I felt that. I am like a trauma surgeon when things go wrong with git. Gold as usual. Amazing tips.
@kaleidea5538
@kaleidea5538 2 Ρ€ΠΎΠΊΠΈ Ρ‚ΠΎΠΌΡƒ
`git reflog` -- it's like quicksave ;-)
@mymaruops
@mymaruops 2 Ρ€ΠΎΠΊΠΈ Ρ‚ΠΎΠΌΡƒ
This gold moving from mecurial to git, kinda hard understanding/adapting to the advanced features but this simplifies it .
@mathijswy
@mathijswy 2 Ρ€ΠΎΠΊΠΈ Ρ‚ΠΎΠΌΡƒ
These videos are really helpful! 😍 What screen capture software do you use to capture it in such high definition?
@gwilhermfolliot5867
@gwilhermfolliot5867 2 Ρ€ΠΎΠΊΠΈ Ρ‚ΠΎΠΌΡƒ
git rebase > git merge when updating a feature branch from dev / master
@DaVince21
@DaVince21 2 Ρ€ΠΎΠΊΠΈ Ρ‚ΠΎΠΌΡƒ
I personally avoid git commit -a or git add . because it will stage and commit all new and changed files and it's important to be selective about what you commit if you happen to be working on a few things at once or just want to separate commits into chunks of specific functionality (so you can revert only those chunks if needed).
@RaulTavares
@RaulTavares 11 місяців Ρ‚ΠΎΠΌΡƒ
'git add -p [file-name]' πŸ™‚
@sufiserious798
@sufiserious798 11 місяців Ρ‚ΠΎΠΌΡƒ
​@@RaulTavares what does -p do?
@eviltom8783
@eviltom8783 10 місяців Ρ‚ΠΎΠΌΡƒ
​@@sufiserious798The -p option let's you selectively add changes from a file instead of adding the entire file. Can sometimes be useful, i suggest you try it out yourself.
@TheRighteousDawn
@TheRighteousDawn 8 місяців Ρ‚ΠΎΠΌΡƒ
This is the sort of shit I don't learn working as a solo developer man -.-
@kabelomalapane9817
@kabelomalapane9817 2 Ρ€ΠΎΠΊΠΈ Ρ‚ΠΎΠΌΡƒ
Beautiful videos. Clear and smart presentations.
@nikensss
@nikensss 2 Ρ€ΠΎΠΊΠΈ Ρ‚ΠΎΠΌΡƒ
Oh, I was really wishing for what the bonus trick does, haha! Something that I do often when before opening a PR is doing β€˜git reset -soft {destination-branch}’ so that my changes are not lost, and then reconstruct the commit history. This helps build a cleaner one. Then do β€˜git push -f’ and that’s it. But, of course, be careful with the β€˜-f’.
@AdroSlice
@AdroSlice 2 Ρ€ΠΎΠΊΠΈ Ρ‚ΠΎΠΌΡƒ
I recommend against renaming the master branch in existing projects, it can break things. Then again, its best to have your branches be named stuff like "prod" for production and "dev" for development
@myfreetimeaccount9450
@myfreetimeaccount9450 Π Ρ–ΠΊ Ρ‚ΠΎΠΌΡƒ
I'm good, I'd rather neck myself than rename from master to main just to please woke activists. Even if main is default I still rename to master.
@evancombs5159
@evancombs5159 Π Ρ–ΠΊ Ρ‚ΠΎΠΌΡƒ
Personally, I like to rename new repos back to master just to spite the word Nazis.
@Klayperson
@Klayperson Π Ρ–ΠΊ Ρ‚ΠΎΠΌΡƒ
I name my master branch fuehrer
@Astech31
@Astech31 Π Ρ–ΠΊ Ρ‚ΠΎΠΌΡƒ
I name my branches Toby…..
@IchiganCS
@IchiganCS 9 місяців Ρ‚ΠΎΠΌΡƒ
@@evancombs5159 Wait till they here that every usb stick is a slave.
@eus9
@eus9 2 Ρ€ΠΎΠΊΠΈ Ρ‚ΠΎΠΌΡƒ
The best thing I did was start using a Git UI (e.g. in Webstorm) for git. I make far fewer mistakes and it helps a lot when doing complex rebase / conflict resolution. It's important to understand git fundamentals but why make it hard for yourself?
@amit-mishra
@amit-mishra 2 Ρ€ΠΎΠΊΠΈ Ρ‚ΠΎΠΌΡƒ
Actually it's harder to leave keyboard and go to mouse that's it
@eus9
@eus9 2 Ρ€ΠΎΠΊΠΈ Ρ‚ΠΎΠΌΡƒ
@@amit-mishra I don't need to leave my keyboard at all to use the UI
@mohamedrabiachaker346
@mohamedrabiachaker346 Π Ρ–ΠΊ Ρ‚ΠΎΠΌΡƒ
Fantastic video, as usual. Thank you my dude, much love
@amanbasanti866
@amanbasanti866 2 Ρ€ΠΎΠΊΠΈ Ρ‚ΠΎΠΌΡƒ
I didn't know about git stash and that looks really useful
@abhishekvishwakarma9045
@abhishekvishwakarma9045 2 Ρ€ΠΎΠΊΠΈ Ρ‚ΠΎΠΌΡƒ
git cherry-pick is also my favorite to pick the commits(changes) from different branches to my current branch, sometimes helpful in testing new changes/features πŸ”₯
@madugahej7021
@madugahej7021 Π Ρ–ΠΊ Ρ‚ΠΎΠΌΡƒ
Kya 'Chacha' kya chal raha hai ? Tumko college me sab log 'Chacha' 'chacha' kyu bolte the ?
@kotopult
@kotopult 2 Ρ€ΠΎΠΊΠΈ Ρ‚ΠΎΠΌΡƒ
That is funny how you tell about β€œmain” but still using ”master” in examples 😁
@philipoakley5498
@philipoakley5498 2 Ρ€ΠΎΠΊΠΈ Ρ‚ΠΎΠΌΡƒ
In the main, You gotta be noticed..
@moh6823
@moh6823 2 Ρ€ΠΎΠΊΠΈ Ρ‚ΠΎΠΌΡƒ
Nice shortcuts!! D3.js in 100 seconds LETS GOOOOOO πŸ₯³πŸ₯³
@stith_pragya
@stith_pragya Π Ρ–ΠΊ Ρ‚ΠΎΠΌΡƒ
Thank You So Much Fireship brother...........πŸ™πŸ»πŸ™πŸ»πŸ™πŸ»
@Carlos123456789Mr
@Carlos123456789Mr 2 Ρ€ΠΎΠΊΠΈ Ρ‚ΠΎΠΌΡƒ
git merge --no-ff performs a merge without fast-forwarding, so the graph still shows merged branches and their commits. This can be set in a global option. Another cool global option is autostash, so that git pull with stash, pull then apply the stash automatically.
@henriquematias1986
@henriquematias1986 2 Ρ€ΠΎΠΊΠΈ Ρ‚ΠΎΠΌΡƒ
autostash sounds really cool! --no-ff i never heard of, good tip as well
@jeremyjones4019
@jeremyjones4019 2 Ρ€ΠΎΠΊΠΈ Ρ‚ΠΎΠΌΡƒ
@@henriquematias1986 Not fast forwarding is actually a terrible tip. There is nothing worst than a git log full of merge commits, makes it hideous and unreadable. It's a trunk based development anti pattern.
@henriquematias1986
@henriquematias1986 2 Ρ€ΠΎΠΊΠΈ Ρ‚ΠΎΠΌΡƒ
@@jeremyjones4019 good to hear you point of view! i'm sure it's useful somehow for some people tough ( : thanks for bringing this up
@viccie211
@viccie211 2 Ρ€ΠΎΠΊΠΈ Ρ‚ΠΎΠΌΡƒ
I know this is controversial, but I really like to use a UI for git. Personally I use Fork. It just gives you a nice graphical overview of the brances, stashes and currently staged files. Especially for beginners it's easier to wrap your head around everything with a UI.
@endresoo9263
@endresoo9263 2 Ρ€ΠΎΠΊΠΈ Ρ‚ΠΎΠΌΡƒ
Very informative as always. Do you accept tips in BAT?
@ilyakushlianski6519
@ilyakushlianski6519 2 Ρ€ΠΎΠΊΠΈ Ρ‚ΠΎΠΌΡƒ
Happened to know almost all these techniques. Thanks for the video anyways!
@devnol
@devnol 2 Ρ€ΠΎΠΊΠΈ Ρ‚ΠΎΠΌΡƒ
4:05 Next thing I know the police is outside my house confiscating all of my IDE drives because they use master/slave configuration jumpers
@Green-pm6wk
@Green-pm6wk 2 Ρ€ΠΎΠΊΠΈ Ρ‚ΠΎΠΌΡƒ
Hey fireship, I think these tricks for terminal git commands are all cool, but I personally believe in the supremacy of GUI's for git. Originally I fell in-love with GitKraken, ended up getting the pro version, and since then I've converted my entire team to using it. While it does bar you off from some the optional commands / flags you can use in your terminal, I feel it includes all the most important git utilities (checking out, commiting/pushing, ammending, reverting, rebasing (also interactive-ly), merging, stashing, and even more) whilst also providing you with an extremely intuitive UI for a git repository's state. About half of the tips you showed in this video I believe can be handled more cleanly in a GUI, the useful ones that I like doing in GitKraken being bisect, interactive rebase, pretty logs and stashes. Just being able to see a project's entire history, who made each commit, the relationship of all branches to one another, are all extremely valuable features on their own.
@silak33
@silak33 2 Ρ€ΠΎΠΊΠΈ Ρ‚ΠΎΠΌΡƒ
I personally only think I really began understanding how git works properly after I started using the console version but that might just be me. I would also have a hard time working without the git-worktree command Β―\_(ツ)_/Β―
@florianhennig4778
@florianhennig4778 11 місяців Ρ‚ΠΎΠΌΡƒ
Yes! Just wanted to second that. Also it has some nice features like adding hunks and partial stashes (for hunks and files). Even though that is possible with some CLI magic too in GitKraken it is way, way easier. For the SSH "I don't have an graphical environment at all" people I can also recommend lazygit, which is a pretty neat TUI for git.
@judahgoff455
@judahgoff455 2 Ρ€ΠΎΠΊΠΈ Ρ‚ΠΎΠΌΡƒ
The - mentioned at the end of the video also works with merge and rebase as well, may also work with more
@Jorji_f
@Jorji_f 2 Ρ€ΠΎΠΊΠΈ Ρ‚ΠΎΠΌΡƒ
thank you for another vid! Love them
@mindless101
@mindless101 2 Ρ€ΠΎΠΊΠΈ Ρ‚ΠΎΠΌΡƒ
When creating a new branch and switching over to it traditionally you would use git branch new-branch git checkout new-branch This can be done with a single command git checkout -b new-branch
@nishanths9652
@nishanths9652 2 Ρ€ΠΎΠΊΠΈ Ρ‚ΠΎΠΌΡƒ
We can use: git switch -c
@arulwastaken
@arulwastaken 2 Ρ€ΠΎΠΊΠΈ Ρ‚ΠΎΠΌΡƒ
@@nishanths9652 its switch only right, checkout -b used to create new branch
@abdullashafi580
@abdullashafi580 2 Ρ€ΠΎΠΊΠΈ Ρ‚ΠΎΠΌΡƒ
still remember this "Nvidia 0:23 you ".
@codebreak8890
@codebreak8890 2 Ρ€ΠΎΠΊΠΈ Ρ‚ΠΎΠΌΡƒ
πŸ˜‚πŸ‘Œ
@nro337
@nro337 2 Ρ€ΠΎΠΊΠΈ Ρ‚ΠΎΠΌΡƒ
Really helpful stuff, thank you so much!
@NabilTharwat_
@NabilTharwat_ 2 Ρ€ΠΎΠΊΠΈ Ρ‚ΠΎΠΌΡƒ
Great video as always! I'd argue though that the first tip would eventually lead to more conflicts and add more gas to the fire than solve a problem. Often you'd be working on something and want to commit a specific set of files and only those files. -am, add ., and others will make the situation worse if you get used to it. They're useful in situations when you really need them, but in my experience that's not the case most of the time. As for the --force tip, you forgot to say a tiny thing that is, if you push your history and your colleagues pull your changes and work locally on them, then you force push your local history, their whole history from the point they pulled your changes may be invalidated, leading to history conflicts between your code on the remote and *everyone* else who pulled the code. This is why generally repos have the option to prevent force push altogether and pushing to master directly altogether. Of course, if you're working alone on a repo then it's fine, but I'd also argue you shouldn't get used to this option in the first place. Revert is a *much* better option.
@nodemodules
@nodemodules 2 Ρ€ΠΎΠΊΠΈ Ρ‚ΠΎΠΌΡƒ
Tip #14 alias pit="git " alias bull="pull " pit bull
@97salmankhan
@97salmankhan 2 Ρ€ΠΎΠΊΠΈ Ρ‚ΠΎΠΌΡƒ
alias bush="push" alias world="origin" alias wide="master " pit bush world wide
@nodemodules
@nodemodules 2 Ρ€ΠΎΠΊΠΈ Ρ‚ΠΎΠΌΡƒ
git bush did 9/11
@ablanchi
@ablanchi 2 Ρ€ΠΎΠΊΠΈ Ρ‚ΠΎΠΌΡƒ
How will you know what the master branch is if everyone is using a different naming convention?
@Terrain2
@Terrain2 2 Ρ€ΠΎΠΊΠΈ Ρ‚ΠΎΠΌΡƒ
because there is always a default branch, and not just a naming convention
@flightvision
@flightvision 2 Ρ€ΠΎΠΊΠΈ Ρ‚ΠΎΠΌΡƒ
@@Terrain2 Git does not have a "default" branch - the first created branch is the default. Github/-lab/Bitbucket added that functionality to their implementation.
@flightvision
@flightvision 2 Ρ€ΠΎΠΊΠΈ Ρ‚ΠΎΠΌΡƒ
but you can rename the first created branch of course - effectively being the default for people cloning the repo.
@Terrain2
@Terrain2 2 Ρ€ΠΎΠΊΠΈ Ρ‚ΠΎΠΌΡƒ
@@flightvision Oh? really? I mean that does sound completely plausible, but how does git know which branch to actually pull if you clone with no extra parameters?
@icarofilho6524
@icarofilho6524 2 Ρ€ΠΎΠΊΠΈ Ρ‚ΠΎΠΌΡƒ
Dude, Many People around their world had problems with their previous BDSM partners so calling the branch master might be offensive to them.
@opalb9006
@opalb9006 2 Ρ€ΠΎΠΊΠΈ Ρ‚ΠΎΠΌΡƒ
3:08 holy shit i did not know this before. you learn something new every day
@lazyteddy123456
@lazyteddy123456 2 Ρ€ΠΎΠΊΠΈ Ρ‚ΠΎΠΌΡƒ
the github tip was actually incredible. Thank you.
@weeb3277
@weeb3277 2 Ρ€ΠΎΠΊΠΈ Ρ‚ΠΎΠΌΡƒ
"git stash save" has been deprecated in favor of "git stash push".
@alanbixby
@alanbixby 2 Ρ€ΠΎΠΊΠΈ Ρ‚ΠΎΠΌΡƒ
Twitter: "everyone should use main instead of master!!" Most Devs: "nah"
@AnotherAvaibleName
@AnotherAvaibleName 2 Ρ€ΠΎΠΊΠΈ Ρ‚ΠΎΠΌΡƒ
Agreed
@kavustock
@kavustock 2 Ρ€ΠΎΠΊΠΈ Ρ‚ΠΎΠΌΡƒ
Do not bend a knee to an ideology that tells you 2 + 2 = 5, men can get pregnant, and gender is a social construct. We have to push back against the woke insanity.
@undefinedvariable8085
@undefinedvariable8085 2 Ρ€ΠΎΠΊΠΈ Ρ‚ΠΎΠΌΡƒ
Medium: "everyone should use main instead o-" Most Devs: "nah" Devto: "everyone should-" Most Devs: "nah"
@theclockworkcadaver7025
@theclockworkcadaver7025 2 Ρ€ΠΎΠΊΠΈ Ρ‚ΠΎΠΌΡƒ
@@kavustock 100%. Don't allow your enemies to define the words you use.
@runeh3022
@runeh3022 2 Ρ€ΠΎΠΊΠΈ Ρ‚ΠΎΠΌΡƒ
Another pointless woke thing then? *sigh* Have they not considered the minority of sexual submissives might prefer the term "Master"? Shame on them.. :-P
@dionito70
@dionito70 2 Ρ€ΠΎΠΊΠΈ Ρ‚ΠΎΠΌΡƒ
Subscribed! Thanks for the content! Small thing: commit -am will not add new files to the repo. Not that it's ever happened to me.
@KayOScode
@KayOScode 2 Ρ€ΠΎΠΊΠΈ Ρ‚ΠΎΠΌΡƒ
I have always used main as my default branch name, but for personal projects, I now use master since they decided to make it politically incorrect
@marcotroster8247
@marcotroster8247 2 Ρ€ΠΎΠΊΠΈ Ρ‚ΠΎΠΌΡƒ
Idk, those Git CLI commands are only for masochistic guys. I mean, the VSCode Git plugin and GitHub/GitLab UI are there for a reason! They visualize the diffs properly, simplify staged commits, assist you at resolving merge conflicts, let you modify the squash message before merging the feature branch, show you which commit made the CI/CD break, etc. Why not use those tools instead? It saves lots of time if properly used :D And btw, great work @Fireship ;)
@christianalbrecht2054
@christianalbrecht2054 2 Ρ€ΠΎΠΊΠΈ Ρ‚ΠΎΠΌΡƒ
@Fireship I have seen your course list, specially focused on resolving conflicts. Maybe you can include the "rerere"-cache to help new developer understanding why they don't need to fix conflicts twice. Have a nice day!
@mattskov2917
@mattskov2917 9 місяців Ρ‚ΠΎΠΌΡƒ
Best git video in the entire world. Thank you for existing fireship
@Jonathan-rm6kt
@Jonathan-rm6kt 2 Ρ€ΠΎΠΊΠΈ Ρ‚ΠΎΠΌΡƒ
Thanks for the social warning. I will start naming all branches just 'branch' so that no one feels left out. I'll also start adding random ascii characters to binary files to make them more inclusive of other bits. It might be a small adjustment in the short term but ultimately worthwhile.
@ScottMaday
@ScottMaday 2 Ρ€ΠΎΠΊΠΈ Ρ‚ΠΎΠΌΡƒ
4:05 I'm going to name the master branch "slave" just to be contrarian
@undefinedvariable8085
@undefinedvariable8085 2 Ρ€ΠΎΠΊΠΈ Ρ‚ΠΎΠΌΡƒ
@@randomyoutubeuser8509 Weed out the "problematic" ones. It's a solid strat.
@hyhih0
@hyhih0 2 Ρ€ΠΎΠΊΠΈ Ρ‚ΠΎΠΌΡƒ
Based and redpilled
@theclockworkcadaver7025
@theclockworkcadaver7025 2 Ρ€ΠΎΠΊΠΈ Ρ‚ΠΎΠΌΡƒ
@@undefinedvariable8085 Exactly, if the word 'master' is too much for someone, we're definitely not gonna be able to work together.
@miss-astronomikal-mcmxcvii
@miss-astronomikal-mcmxcvii Π Ρ–ΠΊ Ρ‚ΠΎΠΌΡƒ
Ahh YES! The first trick you showed I use a lot when updating only modified files. I love the convenience of β€œgit commit -am”!
@eoussama
@eoussama 2 Ρ€ΠΎΠΊΠΈ Ρ‚ΠΎΠΌΡƒ
This video feels like the first page of any StackOverFlow Git-related question's first page. I'm glad to be referring to this video instead of spoofing dust on the lost side of StackOverFlow.
@lesthodson2802
@lesthodson2802 2 Ρ€ΠΎΠΊΠΈ Ρ‚ΠΎΠΌΡƒ
I refuse to use any term other than "master" for the master branch of my project, simply because everyone else insists on changing it.
@JonMasters
@JonMasters 21 дСнь Ρ‚ΠΎΠΌΡƒ
I mean you could say β€œwow, problematic language exists, let’s fix that quickly and easily so we welcome everyone”, or you could be this guy
@NZAnimeManga
@NZAnimeManga 2 Ρ€ΠΎΠΊΠΈ Ρ‚ΠΎΠΌΡƒ
sticking with master, I don't like being dictated to by seditious ideologues.
@orashusedmund7675
@orashusedmund7675 Π Ρ–ΠΊ Ρ‚ΠΎΠΌΡƒ
this was so helpful, thanks man
@SumanthLingappa
@SumanthLingappa 3 місяці Ρ‚ΠΎΠΌΡƒ
Great video as always. the first tip `git -am` will add the git-tracked files (not all the files)
@vemoz2878
@vemoz2878 2 Ρ€ΠΎΠΊΠΈ Ρ‚ΠΎΠΌΡƒ
React-Native in 100 seconds!
@fma1cr
@fma1cr 2 Ρ€ΠΎΠΊΠΈ Ρ‚ΠΎΠΌΡƒ
Programming 100 seconds :)
@NazmulHo1971
@NazmulHo1971 2 Ρ€ΠΎΠΊΠΈ Ρ‚ΠΎΠΌΡƒ
Today's Challenge: Speak rapidly, "Get Good At Git"
@abinahsahoo8135
@abinahsahoo8135 2 Ρ€ΠΎΠΊΠΈ Ρ‚ΠΎΠΌΡƒ
I love his speed
@TheRealisticNihilist
@TheRealisticNihilist 2 Ρ€ΠΎΠΊΠΈ Ρ‚ΠΎΠΌΡƒ
That's just _Bleed_ by Meshuggah
@undefinedvariable8085
@undefinedvariable8085 2 Ρ€ΠΎΠΊΠΈ Ρ‚ΠΎΠΌΡƒ
Tomorrow's Challenge: create a git shortcut for today's challenge.
@raidermack8723
@raidermack8723 2 Ρ€ΠΎΠΊΠΈ Ρ‚ΠΎΠΌΡƒ
You’re awesome πŸ‘ dude. How do retain this info I forget stuff the second I try to use it. Thank you.
@lpanebr
@lpanebr 2 Ρ€ΠΎΠΊΠΈ Ρ‚ΠΎΠΌΡƒ
Amazingly good and useful content. Thanks!
@ddot9182
@ddot9182 2 Ρ€ΠΎΠΊΠΈ Ρ‚ΠΎΠΌΡƒ
less than 30 seconds but there are like 10 "first" comments lol
how to never write bug
7:20
Fireship
ΠŸΠ΅Ρ€Π΅Π³Π»ΡΠ΄Ρ–Π² 811 тис.
100+ Web Development Things you Should Know
13:18
Fireship
ΠŸΠ΅Ρ€Π΅Π³Π»ΡΠ΄Ρ–Π² 1,3 ΠΌΠ»Π½
Nonomen funny videoπŸ˜‚πŸ˜‚πŸ˜‚ #magic
00:29
Nonomen γƒŽγƒŽγƒ‘γƒ³
ΠŸΠ΅Ρ€Π΅Π³Π»ΡΠ΄Ρ–Π² 62 ΠΌΠ»Π½
Git Tutorial For Dummies
19:25
Nick White
ΠŸΠ΅Ρ€Π΅Π³Π»ΡΠ΄Ρ–Π² 953 тис.
10 weird algorithms
9:06
Fireship
ΠŸΠ΅Ρ€Π΅Π³Π»ΡΠ΄Ρ–Π² 1 ΠΌΠ»Π½
5 Ways to DevOps-ify your App - Github Actions Tutorial
12:12
Fireship
ΠŸΠ΅Ρ€Π΅Π³Π»ΡΠ΄Ρ–Π² 666 тис.
How to be a git expert
46:26
Floating Little Leaves of Code
ΠŸΠ΅Ρ€Π΅Π³Π»ΡΠ΄Ρ–Π² 138 тис.
7 Git Tips To Overcome Your Fear of Version Control
11:42
Travis Media
ΠŸΠ΅Ρ€Π΅Π³Π»ΡΠ΄Ρ–Π² 10 тис.
So You Think You Know Git - FOSDEM 2024
47:00
GitButler
ΠŸΠ΅Ρ€Π΅Π³Π»ΡΠ΄Ρ–Π² 874 тис.
How programmers flex on each other
6:20
Fireship
ΠŸΠ΅Ρ€Π΅Π³Π»ΡΠ΄Ρ–Π² 2 ΠΌΠ»Π½
Reacting to Controversial Opinions of Software Engineers
9:18
Fireship
ΠŸΠ΅Ρ€Π΅Π³Π»ΡΠ΄Ρ–Π² 1,9 ΠΌΠ»Π½
I tried 10 code editors
10:28
Fireship
ΠŸΠ΅Ρ€Π΅Π³Π»ΡΠ΄Ρ–Π² 2,8 ΠΌΠ»Π½
How to get rich as a solo software developer - The Ultimate Guide
8:51
Fireship
ΠŸΠ΅Ρ€Π΅Π³Π»ΡΠ΄Ρ–Π² 1,6 ΠΌΠ»Π½
ЭВО Π‘ΠΠœΠ«Π™ ΠœΠžΠ©ΠΠ«Π™ Π˜Π“Π ΠžΠ’ΠžΠ™ БМАРВЀОН ЗА 270$ πŸ”₯
13:33
Thebox - ΠΎ Ρ‚Π΅Ρ…Π½ΠΈΠΊΠ΅ ΠΈ Π³Π°Π΄ΠΆΠ΅Ρ‚Π°Ρ…
ΠŸΠ΅Ρ€Π΅Π³Π»ΡΠ΄Ρ–Π² 36 тис.
Π£ Nokia 3310 появился ΠΊΠΎΠ½ΠΊΡƒΡ€Π΅Π½Ρ‚
0:36
AndroHack
ΠŸΠ΅Ρ€Π΅Π³Π»ΡΠ΄Ρ–Π² 1,8 ΠΌΠ»Π½
Π’Π°ΠΊΠΎΠ³ΠΎ Π²Ρ‹ Ρ‚ΠΎΡ‡Π½ΠΎ Π½Π΅ Π²ΠΈΠ΄Π΅Π»ΠΈ #SonyEricsson #MPF10 #K700
0:19
BenJi Mobile Channel
ΠŸΠ΅Ρ€Π΅Π³Π»ΡΠ΄Ρ–Π² 391 тис.