Skip to content

joyson-madtha0/Git

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Requirements

  1. Git: Windows
  2. VsCode

Initialization

$ git init
# $ rm -rf .git; ls -a

Help

$ git --help

Commit message

$ git add .
$ git commit -m "Inital commit."

Fetch from remote repository

$ git fetch --all

fast-forward a branch

$ git merge --ff-only origin/master

Pull from remote repository

$ git pull [<remote repo>]

Push to remote repository

$ git push
To push the current branch and set the remote as upstream, use
$ git push --set-upstream origin main

Stash the changes

$ git stash
$ git stash pop
$ git stash list

alt text

Create a new branch & Switch between branch

$ git checkout -b new_feature
$ git checkout main

For more info refer here


Merge branch A into B

$ git checkout main
$ git merge emergency-fix

Rebase branch A into B

$ git checkout experiment
$ git rebase master

Cherry Pick a commit

$ git cherry-pick <commit_SHA>

// this is a new line // other line

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published