Open a terminal in your project folder
Check the current status with `git status`
Stage your changes with `git add .`
Commit your changes with `git commit...
Switch to the branch you want to rebase
Run `git fetch`
Rebase your branch onto the target branch with `git rebase `
Resolve any merge conflicts
Stage the...
Go to the repository on GitHub
Click Fork in the top-right corner
Select your account or organization
Wait for the fork to be created
Clone your fork to...
Open a terminal
Navigate to your local repository folder
Run `git pull origin main`
Replace `main` with your branch name if needed
Enter your GitHub credentials if prompted
Resolve...
Open your terminal
Navigate to your Git repository
Create a new branch with `git branch branch-name`
Switch to the new branch with `git checkout branch-name`
Or create and...
Check your current changes with `git status`
Stash tracked changes with `git stash`
Stash tracked and untracked changes with `git stash -u`
Stash all changes including ignored...
`git rebase -i HEAD~n`
Change `pick` to `squash` or `s`
Save and close the editor
Edit the combined commit message
Save and close again
`git push --force-with-lease`
Rename the current branch:
`git branch -m new-branch-name`
Rename a different local branch:
`git branch -m old-branch-name new-branch-name`
Delete the old branch on the remote:
`git push origin --delete...
Open your terminal or command prompt
Navigate to your Git repository
Create a new branch with `git branch branch-name`
Switch to the new branch with `git checkout...
Open a terminal or command prompt
Navigate to the folder where you want the repository
Run `git clone `
Replace `` with the Git repository URL
To clone...
Delete a local branch: `git branch -d branch-name`
Force delete a local branch: `git branch -D branch-name`
Delete a remote branch: `git push origin --delete branch-name`
Delete...
Delete the local repository folder
Run `rm -rf /path/to/repository` on macOS or Linux
Run `rmdir /s /q C:pathtorepository` on Windows Command Prompt
Run `Remove-Item -Recurse -Force C:pathtorepository`...
To undo the last commit but keep changes staged: `git reset --soft HEAD~1`
To undo the last commit and unstage changes: `git reset --mixed HEAD~1`
To...
Run `git status` to see conflicted files
Open each conflicted file
Find conflict markers:
`<<<<<<<`
`=======`
`>>>>>>>`
Edit the file to keep the correct changes
Remove all conflict markers
Save the file
Stage...
Delete a local branch: `git branch -d branch-name`
Force delete a local branch: `git branch -D branch-name`
Delete a remote branch: `git push origin --delete branch-name`
Alternative...
Open your terminal
Navigate to your Git repository
Create a new branch with `git branch branch-name`
Switch to the new branch with `git checkout branch-name`
Or create and...
Switch to the branch where you want the commit applied
Run `git cherry-pick `
Resolve any merge conflicts if they occur
Stage the resolved files with `git...
Download Git from the official website: https://git-scm.com/downloads
Choose the installer for your operating system
Run the downloaded installer
Follow the installation prompts
Select the default options unless you...
Rename the current local branch:
`git branch -m new-branch-name`
Rename a specific local branch:
`git branch -m old-branch-name new-branch-name`
Delete the old branch name from the remote:
`git push...