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.
- git init (in the folder)
- git add . (to add all the files)
- git commit -m “your message here”
- git push origin master <url>(URL of your github repository)
- 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
- git init
- git add ProjectFolderName
- git commit -m "first commit"
- git remote add https://github.com/YourGithubUsername/RepositoryName.git
- git push -u origin master
How to upload a folder to github using command line
- $ git init : To initiate the local folder as git initialized
- To add files to git locally : $ git add .
- $ git commit -m "First Commit" :Save files into git file system
- $ git remote add origin "http url of repository" :Remote login to git
- $ git push origin master -f : Add your files to git repository
No comments:
Post a Comment