Skip to main content

Posts

Showing posts from September, 2022

GIT

  To share this code with your teammates, you’ll want to create a shared Git repository that you can all access. One way to do this is to use GitHub. Head over to github.com, create an account if you don’t have one already, and create a new repository. Configure your local Git repository to use the new GitHub repository as a remote endpoint named origin as follows: git remote add origin git@github.com:<YOUR_USERNAME>/<YOUR_REPO_NAME>.git git push origin main git pull origin main # Create local repo server #git init --bare  change remote repo url: git remote -v # View existing remotes # origin https://github.com/user/repo.git (fetch) # origin https://github.com/user/repo.git (push) git remote set-url origin https://github.com/user/repo2.git # Change the 'origin' remote's URL git remote -v # Verify new remote URL # origin https://github.com/user/repo2.git (fetch) # origin https://github.com/user/repo2.git (push) Git reset & revert: # restore and re