Posts

Fixing Mistakes

Image
 1.STAGED CHANGES COMMAND: git reset file name 2.COMMITTED CHANGES (FOR A SINGLE COMMIT) COMMAND: git reset HEAD~1 3.COMMITTED CHANGES (FOR MANY COMMITS) COMMAND : git reset commi hash git reset --hard commit hash (it reoves all the commits after the mentioned commit hash)

Merge Conflicts

Image
  CONFLICT RISES WHEN GIT GETS CONFUSED TO ADD EITHER BUTTON OR FORM THIS IS SOLEVED MANUALLY  

PULL command

Image
 

Merging Branches

Image
 To push branch into the repo (GITHUB) COMMAND git push --set-upstream origin feature TO MERGE we can use PULL REQUEST  IT APPEARS ON GITHUB WHENEVER A NEW BRANCH IS CREATED

Branch Commands

Image
      BRANCH COMMANDS git branch - to check branch git branch -M main (to rename branch) git checkout branch name (to navigate) git checkout -b new branch name(to create a new branch) git branch -d branch name(to delete )

Pushing into a remote repo(GITHUB) from local repo (VS CODE)

Image
 COMMANDS git remote add origin ------link git remote -v   (to verfiy remote) git branch git branch -M main git push origin main git push -u orign main  initially files are not committed Files are made committed by using commands the files are added to the GITHUB repository using the above commands now the README file is updated and it is to be updated in the repository It is updated by using the appropriate commands

INIT command

Image
 INIT COMMAND - USED TO CREATE A NEW GIT REPO COMMAND-git init