If you're going to force push, it is good practice to use "git push --force-with-lease" - this will prevent you from force pushing if someone else has updated the branch upstream.
Can you talk about dealing with merges and merge conflicts? My basic use of git is solo, I just commit new changes to a dev branch and then merge it with master when it's bug free. I have no clue how to fix merge issues. I once accidentally merged dev to master in github (not locally) and then I had a hell of a time trying to sync up my local copy of master/dev because the history was different. I think my mistake was that I commited to the local branch and tried to push it to github which was not the same as my local copy. I ended up having to do a bunch of forced things just to try to get my local copy to match and then had to redo my newest changes. It was a pain and I find myself getting into a pickle like this every once in a while and the "solution" always like 10 different commands that I don't understand. DX
Avoid conflicts by keeping branches up-to-date. Developers, when resolving conflicts, have a tendency to abandon others changes in favor of their own. This tendency causes lots of problems. But, conflicts still happen and the best tool that I've come upon for resolving conflicts is Beyond Compare.
Instead of rebasing, just merge the develop branch into the feature branch. Better yet, merge the origin /develop branch with git pull then git merge origin/develop.
Hey i wanna start programming but i dont know which language i should start with. I had Python on my mind cuz it seems easier to learn than others but is it any good ? Sry if this seems like a dumb question :) Is there even something like the "Best" language ? something with more future or more ways to get better and to more stuff than in other languages
Great summary of git for teams! One thing I would add is that “feature” branches can be branched from master rather than dev. That’s useful if your team deploys periodically (e.g. weekly) rather than a full release at a time.
Really nice series overall. Good refresher for someone like me who mainly uses git solo and sporadically. Any tips on how to get in the mindset of adding/committing/using branches more often? I've been trying in my recent project but sometimes I have nice small sensible commits and sometimes I have 8 hours of work completing 10 small features without a single commit in between. Also would love a bit on merge conflicts. I remember that back when I was using IntelliJ it had a great graphical merge conflict resolver, but VScode seems to be a bit limited even with git extensions (unless I'm missing something). Either way I'd like an overview on just the basic terminal/text file resolving and how to make sense of what's going on. Thanks a lot!
I still have trouble making a branch sometimes, I just jump in and start working and realize I'm working on my master, usually about the time someone walks in and says "X isn't working properly, can you fix it?" I'm getting much better at it though, just has to become force of habit through repetition. As far as VSCode I can't contribute, don't use it and I've never used a graphical conflict resolver. Sounds all point and clicky.
You mentioned the drawback of rebase / force-push when collaborating on a feature but you didn't talk about the alternative - merge develop to your feature branch.
Dang, I seem to be the first to comment. I didn't actually have a comment to make until I saw the blank page of comments so I'm at a disadvantage. Great job EM!
If you're going to force push, it is good practice to use "git push --force-with-lease" - this will prevent you from force pushing if someone else has updated the branch upstream.
This guy look like Gilfoyle of Silicon valley
can we get some command line demos
"Force pushing" sounds like something a Jedi would do.
Can you talk about dealing with merges and merge conflicts? My basic use of git is solo, I just commit new changes to a dev branch and then merge it with master when it's bug free. I have no clue how to fix merge issues. I once accidentally merged dev to master in github (not locally) and then I had a hell of a time trying to sync up my local copy of master/dev because the history was different.
I think my mistake was that I commited to the local branch and tried to push it to github which was not the same as my local copy. I ended up having to do a bunch of forced things just to try to get my local copy to match and then had to redo my newest changes. It was a pain and I find myself getting into a pickle like this every once in a while and the "solution" always like 10 different commands that I don't understand. DX
Avoid conflicts by keeping branches up-to-date. Developers, when resolving conflicts, have a tendency to abandon others changes in favor of their own. This tendency causes lots of problems. But, conflicts still happen and the best tool that I've come upon for resolving conflicts is Beyond Compare.
Instead of rebasing, just merge the develop branch into the feature branch. Better yet, merge the origin /develop branch with git pull then git merge origin/develop.
Could you discuss tags? What they're for, when to use them? Thanks!
I did, have a look at video 2 on common usage.
You are a really good teacher (IMO). Thank you.
It would be awesome if you could discuss how sending a patch on email works and then how exactly is it merged upstream.
It's unfortunate that Git doesn't allow shard files.
Hey i wanna start programming but i dont know which language i should start with.
I had Python on my mind cuz it seems easier to learn than others but is it any good ?
Sry if this seems like a dumb question :)
Is there even something like the "Best" language ? something with more future or more ways to get better and to more stuff than in other languages
hey is he using helix linux
Great summary of git for teams! One thing I would add is that “feature” branches can be branched from master rather than dev. That’s useful if your team deploys periodically (e.g. weekly) rather than a full release at a time.
I have no idea what this guy is talking about but i somehow find it very interesting.
Very insightful video! Thx for all the great content.
Nice job explaining often confusing material. 👍
just to clarify is a git rebase simply a git stash -> git merge -> git pop -> git commit? or did i miss something
Only if you've never committed work yet on that branch, then yes.
This is the only tech channel I am following online. Thanks.
Really nice series overall. Good refresher for someone like me who mainly uses git solo and sporadically. Any tips on how to get in the mindset of adding/committing/using branches more often? I've been trying in my recent project but sometimes I have nice small sensible commits and sometimes I have 8 hours of work completing 10 small features without a single commit in between.
Also would love a bit on merge conflicts. I remember that back when I was using IntelliJ it had a great graphical merge conflict resolver, but VScode seems to be a bit limited even with git extensions (unless I'm missing something). Either way I'd like an overview on just the basic terminal/text file resolving and how to make sense of what's going on. Thanks a lot!
I still have trouble making a branch sometimes, I just jump in and start working and realize I'm working on my master, usually about the time someone walks in and says "X isn't working properly, can you fix it?" I'm getting much better at it though, just has to become force of habit through repetition.
As far as VSCode I can't contribute, don't use it and I've never used a graphical conflict resolver. Sounds all point and clicky.
Thank you! This series was very helpful!
🖤
You mentioned the drawback of rebase / force-push when collaborating on a feature but you didn't talk about the alternative - merge develop to your feature branch.
This is exactly what git flow is ! Great explanation
Dang, I seem to be the first to comment. I didn't actually have a comment to make until I saw the blank page of comments so I'm at a disadvantage. Great job EM!