Latest Updates

Post Top Ad

21 August, 2021

Pull all codes from GitHub to Different User Git

  

Steps to Pull all codes from GitHub to Different User Git


Different development team members would be working on different codes. Each day developers make changes to codes. They generally upload the updated codes to GitHub so everyone can see a new updated code. To fetch new codes or updated codes we must pull codes from GitHub.

In this blog, we will pull codes from Github by different users to their respective local repository ie Git.







  • Create a directory and initiate git on a different machine
  • Add Remote Repository (GitHub) to Local Repository (Git)
  • Git Status
  • Push from GitHub to Git
  • Verify Files with Logs in Git


1. Create a directory and initiate git on a different machine

Follow All Steps: Click Here
   

2. Add Remote Repository (GitHub) to Local Repository (Git)


A new user also has to add remote server access to his local git. Command to add remote server to local git

git remote add origin https://github.com/piyushprakashpp/centralgit.git


3. Git Status

At this moment there shouldn't be any file present in the directory.



4. Push from Git to GitHub

git pull origin master

The command will pull all files from the GitHub master branch to the local repository.



5. Verify files with logs in Git

git show <commit_id>

commit_id is an alphanumeric character. Copy some part of it.







Please Subscribe and Like

No comments:

Post Top Ad

Your Ad Spot

Pages