To “squash”
The act of “squashing” your commits means that you combine multiple existing commits into a single one. If you should do this or avoid it is - to some extent - a question of preference: in some teams, for example, squashing commits is the preferred way to merge a feature branch back into a long-running branch like “master” or “main”.
Order of steps?
Branch????
1. Add
2.Commit
3.pull( FETCH+MERGE)!!!!!!!!!!!!!!!!!!!!!!!!!
4. Push?
Git
Git is an open-source version control system often used for source code management
How to integrate changes from one branch onto another in GIT
1.Rebasing - the linear process of merging
Rebasing is the process of combining or moving a sequence of commits on top of a new base commit.
Git commands
1.CLONE
git clone URL
Git clone is a command for downloading existing source code from a remote repository (like Github, for example). In other words, Git clone basically makes an identical copy of the latest version of a project in a repository and saves it to your computer.
2.BRANCH
-By using branches, several developers are able to work in parallel on the same project simultaneously
2.1. Creating a new branch locally
git branch <branch-name></branch-name>
2.2.Switching from one branch to another
git checkout <name-of-your-branch></name-of-your-branch>
*The changes in your current branch must be committed or stashed before you switch
*The branch you want to check out should exist in your local
*create and switch to a branch at the same time:
git checkout -b <name-of-your-branch></name-of-your-branch>
2.3. Push the new branch into the remote repository
git push -u <remote> <branch-name>
2.3. Viewing branches:
git branch or git branch --list</branch-name></remote>
2.4. Deleting a branch:
git branch -d <branch-name></branch-name>
git commit -m “commit message”
Git commit saves your changes only locally.!!!!!
git revert 3321844