Tag: Git

How to Replace Master Branch with Another Branch?

Suppose we have created a dev branch from the master branch and then the dev branch has got some new commits. So, now we want to keep only the dev branch’s codes in master branch except all the old codes from the master. Let see how we can do that –

Make sure that your local master is up to date with the master remote:

Read More “How to Replace Master Branch with Another Branch?”

Git Command

Git Command

Go to the directory you want to initiate Git and then follow the commands:

  1. Initiate the git:
  2. Remove Git if you have initiated in a wrong place ( Be aware if there is another git in the subdirectory):
  3. To add all the files(including subdirectory) to staging step: