• Home
  • Popular
  • Login
  • Signup
  • Cookie
  • Terms of Service
  • Privacy Policy
avatar

Posted by @pankajsen


13 Jul, 2024

Updated at 27 Dec, 2024

How To Upload Large Files to GitHub Repository

  1. Download and install Git on your PC
  2. Then download and Install GitLFS on your PC
  3. Now clone your Github Repository to your local machine
  4. First go to your Repository and copy the clone/download? URL1*W1ZsQmZkG4we1YqLa01WuA.jpeg

Next, create a new folder in your pc wherever you prefer: this is to clone the copy of your GitHub repository to your PC.

Then right-click the background and click ?Git Bash Here? as follows.

1*lhAUmsVZTJbPwA94kaaPQA.jpeg
  1. Then run the following command in the bash terminal opened.
  2. ?
  3. ?$ git clone link you copied
  4. Eg:-$ git clone https://github.com/Newuser/NewRepository.git
  5. ?
  6. Close the bash terminal and, now you have successfully cloned your GitHub repository to your local machine.
  7. 1*pEy_HxAi95daEsxRx7aLiQ.jpeg

?

Go to inside the cloned repository. (If you want to upload the file to another folder already created inside the repository, then go to that folder)

?

Right-click the background and again click ?Git Bash Here?.

?

Run the following command

$ git lfs track ?.fileextension?

Eg: If I want to upload a pdf file, then
? ? $ git lfs track ?.pdf?

?

Then copy the file you want to upload, into repository or folder in the repository.

?

Then run the command,

?

?$ git add filename.fileextension

Eg:- $ git add TheGuid.pdf

?

We should log into GitHub to push the file to the repository, run the following commands.

?

?$ git config --global user.email ?[email protected]?

Eg:- $ git config --global user.email ?[email protected]?

?

Now run the following command.

?

?$ git commit -m "commit message"

Eg:- $ git commit -m ?add TheGuid.pdf?

?

$ git push origin master

This command will start the uploading the file.

?

You will notice the progress of the uploading in the bash terminal as follows

1*xzQ4wEkgieH4hYBqnDwxHw.jpeg