0 votes
in Git by

How do you manage set of tracked/remote repositories?

1 Answer

0 votes
by
We add a remote repository(origin) using command 'git remote add origin [email protected]:User/UserRepo.git' (you can change it later using command 'git remote set-url origin [email protected]:User/UserRepo.git').

We can list the remote repositories using 'git remote -v' command and this will display the name and the url of the remote repositories.

We push our changes up to our remote repository using command 'git push -u origin master'; here -u is upstream(use -u only for first push command just once), origin is remote name and master is the branch's name.

Then we'll do a pull from remote repository to our local git repository using 'git pull' or 'git pull <remote-name> <branch-name>' command to receive all your remote changes (commits) from the remote repository.

Related questions

+1 vote
asked Oct 15, 2019 in Git by rajeshsharma
0 votes
asked Feb 13, 2022 in Git by rajeshsharma
...