Monday, 9 November 2020

steps to use Github (Lets say I want to upload my project folder containing lots of files and folders in it

The steps to use Github (Lets say I want to upload my project folder containing lots of files and folders in it)?


Download the Git Bash on your PC and follow the following steps.

  1. git init (in the folder)
  2. git add . (to add all the files)
  3. git commit -m “your message here”
  4. git push origin master <url>(URL of your github repository)
  5. git push origin master.

1. First make the repository (Name=RepositoryName) on github.
2. Open the terminal and make the new directory (mkdir NewDirectory).
3. Copy your ProjectFolder to this NewDirectory.
4. Change the present work directory to NewDirectory.
5. Run these commands

How to upload a folder to github using command line

  1. $ git init : To initiate the local folder as git initialized
  2. To add files to git locally : $ git add .
  3. $ git commit -m "First Commit" :Save files into git file system
  4. $ git remote add origin "http url of repository" :Remote login to git
  5. $ git push origin master -f : Add your files to git repository

No comments:

Post a Comment

Baisic Useful Git Commands

  Pushing a fresh repository Create a fresh repository(Any cloud repository). Open terminal (for mac ) and command (windows) and type the be...