@_RustyRooster
Magdalena
4 months
The reason I use “git fetch && git rebase” instead of “git pull” is because a senior dev told me it was better this way when I was an intern, he didn’t tell me why and now I do stuff for the only sake of not looking stupid 🫠
13
0
47

Replies

@o_stefanishyna
Olha Stefanishyna
4 months
@_RustyRooster Do you update your branches with changes in main this way?
1
0
1
@_RustyRooster
Magdalena
4 months
1
0
1
@ramenhost
Ramkumar
4 months
@_RustyRooster Equivalent would be "git pull --rebase"
2
0
7
@_RustyRooster
Magdalena
4 months
@ramenhost 😳 Really???
1
0
1
@wydmanski_
Adrian
4 months
@_RustyRooster Just do `git reset --hard origin/<branch>` 😈
1
0
1
@_RustyRooster
Magdalena
4 months
@wydmanski_ I’ll try it next time, thanks! 🙏🏻
0
0
0
@MiguelSarenas
Miguel Sarenas
4 months
@_RustyRooster you can set git pull to rebase in the config
0
0
0
@donaldklee
Donald Lee
4 months
@_RustyRooster Git fetch gets all the branches that you don't have locally. Rebase for when you don't wanna write new commit messages. 🤣
0
0
1
@Davonne007
Davonne Vigil
4 months
@_RustyRooster This was definitely some insight .,.!
0
0
1
@ChShersh
Dmitrii Kovanikov
4 months
@_RustyRooster Nowadays, I work from forks, so I do the following commands to sync my main branch with upstream git fetch upstream main git reset --hard upstream/main This way I fetch only one branch instead of pulling all the garbage. I used to do git pull --ff-only --prune Which is…
0
0
7
@GhostyWP
Ignacio
4 months
0
0
1
@vinnie_navi
navi𐙚˚⊹
4 months
@_RustyRooster Fetch only accepts the incoming changes but doesn't update your branch, whereas git pull rebase will update your branch with everyone's changes...
0
0
1
@ACruickshank72
Adam Cruickshank
4 months
@_RustyRooster Clicks on sync on bitbucket and whistles.
0
0
0
@kwando88
Hannes Nevalainen 🦀
4 months
@_RustyRooster At my company we squash prs when merging, so I just do “git fetch && git merge origin/main”.. I dont mind the merge commits in my pr branch
0
0
1
@hputzek
Dystopia 💅
4 months
@_RustyRooster If u have enough time to spend I can recommend which gives some nice insights, also on the topic "merge vs rebase"✨
0
0
1
@ravancodes
Ram
4 months
@_RustyRooster I just now read about the differences. Using git rebase instead of git pull can result in a cleaner history by incorporating changes without creating any additional merge commits. super helpful when working as a team. thanks for sharing !!
0
0
0