banner



How To Upload Files To Github From Windows

This article is solely for newbies in Github regarding how to push button large files to your Github repository.

GitHub does not let u.s.a. to upload files larger than 25 megabytes through the browser. If you try you may go an error as follows.

Github error message when try to upload large files

Figure 01: Error message (Image source: Screenshot past the Author)

Nevertheless, you can push button larger files into your GitHub repository using the git bash terminal equally follows, in merely 8 steps.

Footstep 01

Download and install Git on your pc.

Download link:- https://git-scm.com/downloads

Pace 02

Then download and install GitLFS on your pc.

Download link: https://git-lfs.github.com/

Step 03

At present clone your GitHub repository to your local machine.

For this,

First become to your repository and copy the 'clone/download' URL.

Copy the clone or download URL

Figure02: Re-create the clone or download URL (Epitome source: Screenshot by the Author)

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

Then right-click the groundwork and click 'Git Bash Here' every bit follows.

Opening Git Bash terminal

Figure 03: Opening Git Bash (Epitome source: Screenshot by the Writer)

So run the following command in the fustigate last opened.

                      $            git            clone                          link you copied                    Eg:- $ git clone https://github.com/Newuser/NewRepository.git        

Shut the fustigate final and, at present yous take successfully cloned your GitHub repository to your local machine.

The repository named NewRepository has cloned successfully

Figure 04: The repository named NewRepository has cloned to the local car (Image source: Screenshot by the Writer)

Footstep 04

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

Correct-click the groundwork and once more click 'Git Bash Here'.

Run the following control

                      $            git lfs rail            ".fileextension"          Eg: If I want to upload a pdf file, and then
$ git lfs track ".pdf"

Step 05

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

Step 06

So run the command,

                      $            git add together            filename.fileextension                    Eg:- $ git add together            TheGuid.pdf                  

Pace 07

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

                      $            git config --global user.email            "yous@example.com"          Eg:- $ git config --global user.email "123abc@gmail.com"        

For this utilize your electronic mail address used in Github account.

                      $            git config --global user.proper name            "your name"          Eg:- $ git config --global user.name "George Bernard"        

For this use your proper name in Github account. Y'all tin find your email and name in the settings of the Github account.

Then a window will pop out asking your Github electronic mail/user proper name and countersign. Enter the credentials and submit them.

Step 08

Now run the following command.

                      $            git commit -m            "commit bulletin"          Eg:- $ git commit -chiliad "add together TheGuid.pdf"        

Next run,

                      $            git push origin master                    This command will start the uploading the file.        

You volition notice the progress of the uploading in the fustigate terminal as follows

progress of file upload shown in bash terminal

Effigy 05: Progress of file upload (Image source: Screenshot by the Author)

Subsequently uploading is finished, you may notice the file is uploaded to your GitHub repository, successfully.

Source: https://medium.com/linkit-intecs/how-to-upload-large-files-to-github-repository-2b1e03723d2

Posted by: weberneart1942.blogspot.com

0 Response to "How To Upload Files To Github From Windows"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel