Skip to main content

How to become a GIT Guru? The most common mistakes and their solutions

About Us
Published by jetbi
31 October 2022
64

How often does it happen when you have been working on a project for a long time, have already made a bunch of changes, and have almost reached the goal but suddenly something irreversible happens? Maybe you committed the changes to the wrong branch or a merge conflict appeared... Now the panic attack is getting you. Familiar feeling? You are not alone: this is quite a common situation for every developer.

As you have already guessed, we will discuss the version control system today, specifically using GIT as an example. Developers from all over the world use this tool in their work on a daily basis. Still, many of them don’t give much attention to this topic, use only the most common commands, and don’t even know about half of the possibilities that GIT provides.

Sometimes, due to the lack of proper experience and knowledge, unexpected situations happen and people immediately start to panic and, therefore, make a lot of mistakes until they reach the point of no return. In such situations, you mostly don’t even suspect that the solution lies on the surface. So, let’s find the solution. Once Leonardo Da Vinci said, "Simplicity is the ultimate sophistication". And it's true!

I want to say you are truly lucky today! Why? Because I'm about to give you a pill that will relieve your constant "headache," save you a lot of nerve cells when working with GIT and help you understand what Leonardo Da Vinci meant. All you gotta do just read this article until the end. Well, here we go!

Today we consider the top 3 the most common mistakes and their solutions:

1. Commit error. Have you just created a new file and made changes to the old one, but forgot to add something to the commit? Or maybe you made a mistake in the comment? All you need is to use the git commit --amend. Running this command will open a default text editor where you can edit the commit message. After exiting the editor, the description of the commit will be changed.

2. Committed changes to the wrong branch. You have been working on a new task for several hours, making more and more commits, and suddenly you realized that you have been doing these things in the master branch all that time… Just, please, don't panic, it could be fixed, just enter the following commands:

git branch future-brunch

git reset HEAD~ --hard

git checkout future-brunch

3. Desperate situation. If you understood that you have made too many mistakes and hundreds of new changes are not valid, even in such a situation there is a very simple solution. Here you will come to the aid of such a command as git reflog. Using this command you can go back in time, undoing almost anything done in GIT. Even if it was reset.

Congratulations, now you're almost a GIT guru! Now you understand when working with GIT there is nothing to worry about and everything can be fixed. Thank you for your attention, we’ve done it! Whoo!

 

You can find more interesting articles here: https://jetbi.com/blog


Daria Daineka
Junior Salesforce Developer
image
Question to the expert
image

We have available resources to start working on your project within 5 business days

1 UX Designer

image

1 Admin

image

2 QA engineers

image

1 Consultant

image
Related Articles
All articles
image
Is Salesforce Winning the Public Sector Race?
An analysis of Salesforce's rapid expansion into the U.S. public sector, tracing its path from cautious early government licensing deals in the 2010s through the launch of Government Cloud in 2012, its pivotal role in COVID-19 vaccine rollouts, and its 2025–2026 push into military and intelligence work via Agentforce and Missionforce. The piece covers major 2026 contracts — including a $5.6 billion Army deal, a $1.6 billion VA agreement, and Pentagon Impact Level 5 authorization — alongside real-world case studies like California's REAL ID processing and the UK's NHS back-office operations. It also examines the structural obstacles still facing Salesforce and other vendors in government tech: legacy IT systems decades old, outdated federal procurement rules, budget constraints, and organizational caution around AI adoption, plus the competitive pressure from Palantir, Microsoft, and Oracle in the race for public sector AI spending.
28 August 2026
image
Why Your Salesforce Flows Are Agentforce's Biggest Problem
This article argues that the most underestimated risk in Agentforce deployments isn't data quality — it's the automation layer: years of overlapping Flows, Process Builder processes, Apex triggers, and managed package logic that no one has reviewed end-to-end. It explains why AI agents inherit automation complexity without the tribal knowledge human admins carry, why technical debt only becomes visible after an agent hits it in production, and why a clean demo is no indicator of production readiness. The article closes with a concrete, tool-by-tool inventory approach using Flow Trigger Explorer, Salesforce Optimizer, Setup Audit Trail, Apex Debug Logs, Agent Builder, and Health Check — scoped to the specific processes the agent will actually use rather than the whole org.
23 July 2026
image
How to Wire Multiple Salesforce Projects in One Org Without Breaking Everything
This article maps the real integration patterns that emerge when multiple Salesforce projects — both managed packages and unpackaged code — share a single org. It covers four concrete patterns: attaching custom triggers to package-owned objects, calling global members exposed by managed packages, writing directly into another project's objects, and runtime-guarded reads of package data. It then addresses access control for authenticated and guest users, including the Master-Detail wall and the without sharing elevation pattern. The piece closes with eight concrete risks (compile-time dependencies that block uninstall, upgrade coupling, silent cascade failures, access invisible to admins) and six actionable recommendations for keeping cross-project coupling manageable.
08 July 2026