× About Services Clients Contact
☰ open

What is git push?

The git push command is used to upload local repository content to a remote repository. Pushing is how you transfer commits from your local repository to a remote repo.
It's the counterpart to git clone, but whereas cloaning imports commits to local branches, pushing exports commits to remote branches. Remote branches are configured using the git remote command.

Note: Pushing has the potential to overwrite changes, caution should be taken when pushing.


How to push?

I'm giving an idea to push from your local (with git installed) to your repository.

1st Method


If you created a new folder at your local then you have to do the following for initilization.
Open your folder with the files you want to push.
In the address bar select all and type cmd.

📁 > This PC > Desktop > GitHelp

cmd
then press ↵Enter

In Cmd write the following:

git init

git add .    OR   git add ≺filename≻

git commit -m "[message]"

git remote add origin ≺your repo link≻

git push origin master

2nd Method

Fisrt clone your git repository at your local.
For this open Command prompt and write

cd desktop

git clone ≺repository link≻

then
Open the folder.
put all the files and folders in it.
Afterthen in the address bar select all and type cmd.

git add .    OR   git add ≺filename≻

git commit -m "[message]"

git push ≺repo link≻


Help!

For external help providing PDF and you tube video.

---X---