HomeLinuxThe way to Git Push to a Personal Repo?

The way to Git Push to a Personal Repo?


Whereas engaged on Git, builders work on their native system. After finishing their work regionally, they push their work to the distant repository. Nonetheless, the distant repository may be public or non-public. Extra particularly, GitHub permits customers to create and save their work to any public or non-public repository.

This examine will clarify the process to Git push to a non-public repository.

The way to Git Push to a Personal Repository?

To push to a non-public repository, observe the below-provided steps:

Step 1: Redirect to Native Repository

First, enter the below-listed command and change to the specified native repository:

$ cd “C:GitdemoProject”

 

Step 2: View Repository Content material

Then, record the content material of the present working repository:

 

Step 3: Add Distant URL

Now, make the most of the given command together with the non-public distant repository’s URL and hyperlink the native repository with it:

$ git distant add origin https://github.com/laibayounas/Private_repo.git

 

Step 4: Confirm Distant URL

After that, guarantee whether or not the distant URL has been added or not using the next command:

 

It may be seen that the distant URL has been added efficiently:

Step 5: Push to Personal Repository

Lastly, execute the next command to push the content material of the native repository to the non-public distant repository:

 

The beneath output signifies that the native adjustments have been pushed to the distant repository:

Step 6: Confirm Modifications on Distant Repository

To confirm whether or not the adjustments have been pushed to the non-public repository or not, open the GitHub, navigate to the specified non-public repository and consider adjustments:

Within the above screenshot, the native repository’s content material may be seen within the non-public distant repository.

Conclusion

To push to a non-public repository, first, navigate to the native repository and consider its content material. Then, add the distant URL to attach the native repository with the non-public distant repository. Subsequent, execute the “git push origin grasp” command to push adjustments to the non-public repository. Lastly, confirm adjustments within the distant repository. This examine defined the process to Git push to a non-public repository.

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments