DEV Community

Nirupamvas
Nirupamvas

Posted on • Updated on

Pushing Large Files to GitHub(CMD-V)

Hello everyone in todays article we will see how you can upload large files i.e, Files>25MB to you Git Repositories. So Lets get started.

Before getting started make sure that the following things are ready

  1. Make you have a GitHub account
  2. Download and install GITBASH
  3. Configure GITBASH i.e, connect it with you GitHub account

Now I hope everything is ready so lets begin.

  • Open the command line ("Terminal" on the Mac, "Git Bash" on Windows) and change into your project's base directory. There, you can create a new Git repository:
$ cd projects/my-project
$ cd projects/my-project/git init
Enter fullscreen mode Exit fullscreen mode
  • As a first step, you can add all of your current files to the repository and then bundle these in a commit:
$ git add .
$ git commit -m "Initial commit"
Enter fullscreen mode Exit fullscreen mode
  • Now, you are ready to push your code to GitHub!

How to Push to GitHub

Before you can upload your code to GitHub, you need to create a remote repository in your GitHub account.

Using Git on the Command Line

  • If you're working with Git on the Command Line, you'll have to open the GitHub.com interface in your browser. Right on the "Dashboard" view, you can see a button to create a new repository:
    Alt Text

  • Then, on the project's main page, you can use the green "Code" button to reveal the repository's remote URL and copy it to your clipboard:

Alt Text

  • You can then connect this remote repository to your local Git repository with the following command:
$ git remote add origin <remote repository URL>
Enter fullscreen mode Exit fullscreen mode
  • The final step is to push your changes from your local repository to your new remote repository:
$ git push origin master
Enter fullscreen mode Exit fullscreen mode

NOTE:
The maximum size of GitHub is 100 MB per file, 1 GB per repo

So that's it guys!
If you like this article hit that button, if you have any doubt's you can comment down below.

Top comments (0)