Skip to content

Instantly share code, notes, and snippets.

View 97balakrishnan's full-sized avatar
🌴
Being Happy

Balakrishnan S 97balakrishnan

🌴
Being Happy
View GitHub Profile
git fetch && git rebase origin/main
Fetches updated commits from repository and rebases local repository
git cherry-pick <commit-id>
Pick one commit alone from other branches or remote and apply on top of latest commit
git reset --soft <commit-id>
Resets head to commit id but the changes in the commits above it are in staged state.
I usually use this to combine 2-3 commits to a single commit by doing a 'git commit --amend' after doing this
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
body, html {
height: 100%;
margin: 0;
font: 400 15px/1.8 "Lato", sans-serif;
color: #777;