- 7
- 249
Linux Labs
India
เข้าร่วมเมื่อ 28 เม.ย. 2021
$ sudo all update && upgrade tech-knowledge
Git Merge vs Git Rebase Explained | Linux Labs
When we 𝐦𝐞𝐫𝐠𝐞 𝐜𝐡𝐚𝐧𝐠𝐞𝐬 from one Git branch to another, we can use ‘git merge’ or ‘git rebase’. The diagram below shows how the two commands work.
𝐆𝐢𝐭 𝐌𝐞𝐫𝐠𝐞
This creates a new commit G’ in the main branch. G’ ties the histories of both main and feature branches.
Git merge is 𝐧𝐨𝐧-𝐝𝐞𝐬𝐭𝐫𝐮𝐜𝐭𝐢𝐯𝐞. Neither the main nor the feature branch is changed.
𝐆𝐢𝐭 𝐑𝐞𝐛𝐚𝐬𝐞
Git rebase moves the feature branch histories to the head of the main branch. It creates new commits E’, F’, and G’ for each commit in the feature branch.
The benefit of rebase is that it has 𝐥𝐢𝐧𝐞𝐚𝐫 𝐜𝐨𝐦𝐦𝐢𝐭 𝐡𝐢𝐬𝐭𝐨𝐫𝐲.
Rebase can be dangerous if “the golden rule of git rebase” is not followed.
𝐓𝐡𝐞 𝐆𝐨𝐥𝐝𝐞𝐧 𝐑𝐮𝐥𝐞 𝐨𝐟 𝐆𝐢𝐭 𝐑𝐞𝐛𝐚𝐬𝐞
Never use it on public branches!
𝐆𝐢𝐭 𝐌𝐞𝐫𝐠𝐞
This creates a new commit G’ in the main branch. G’ ties the histories of both main and feature branches.
Git merge is 𝐧𝐨𝐧-𝐝𝐞𝐬𝐭𝐫𝐮𝐜𝐭𝐢𝐯𝐞. Neither the main nor the feature branch is changed.
𝐆𝐢𝐭 𝐑𝐞𝐛𝐚𝐬𝐞
Git rebase moves the feature branch histories to the head of the main branch. It creates new commits E’, F’, and G’ for each commit in the feature branch.
The benefit of rebase is that it has 𝐥𝐢𝐧𝐞𝐚𝐫 𝐜𝐨𝐦𝐦𝐢𝐭 𝐡𝐢𝐬𝐭𝐨𝐫𝐲.
Rebase can be dangerous if “the golden rule of git rebase” is not followed.
𝐓𝐡𝐞 𝐆𝐨𝐥𝐝𝐞𝐧 𝐑𝐮𝐥𝐞 𝐨𝐟 𝐆𝐢𝐭 𝐑𝐞𝐛𝐚𝐬𝐞
Never use it on public branches!
มุมมอง: 14
วีดีโอ
How to deploy React App on Netlify ? | Netlify Demo | React Apps | Web Development
มุมมอง 446 หลายเดือนก่อน
Here is a short video, explaining how to deploy your react apps on netlify. Some useful commands and shortcuts: To open terminal in VsCode: ctrl J To run react app on localhost: npm run start To make the build folder npm run build Code link of the react app : github.com/thefearlesscoder/wev-dev-codes/tree/master/learn-React/counter-app-using-React
Weather App | Web Development Project | JavaScript | API | HTML-CSS
มุมมอง 616 หลายเดือนก่อน
A simple Weather App that display the weather information of the current location of the user as well as the location searched by the user. Through this learn about, basic API integration in Websites. Credits : @LoveBabbar @CodeHelp web development course. Code links : github.com/thefearlesscoder/wev-dev-codes/tree/master/learn-React
Plan with Vivek | Basic React JS app | learning by doing | Source code in the description
มุมมอง 196 หลายเดือนก่อน
Credits to @LoveBabbar and @CodeHelp source code link : github.com/thefearlesscoder/wev-dev-codes/tree/master/learn-React/Plan-With-Love
WindowsXP pro installation in 2024 !!!
มุมมอง 157 หลายเดือนก่อน
Let's go on to a nostalgic journey of revisiting the old OS Windows XP Pro.
hey ! i came here from your quora, can you tell me your jee rank if you dont mind?
5k