How to copy a folder to gitHub

I'm new to GitHub, I can create a README text file and commit it (from my local machine to the github site), but now my problem is that I have one folder and I need to copy this folder to the git hub, can anyone Do any of you help me with this.

+6
source share
5 answers

Try the following:

git add myfolder
git commit -m "some message"
git push
+15
source

git add FOLDERNAME

After that, you can do the usual commit + push, as you did, with the README file.

+1
source

. -

  • .
  • , .
  • ( , , .)
+1

:

git commit folder_path -m "your comment"

folder_path , - ../../../folder_path

0

, GitHub:

1. (), , .

$ cd folderName (or) $ cd ~/FolderName 
$git init

2. / GitRepository

$ git add FolderName/

3. ( ) GitRepository

$ git commit -m "Some Message" 

4: GitHub . GitHub Repository. URL " " GitHub

$ git remote add origin URL

5. / HitHub

$ git push -u origin master

GitHub, , . , !

0

All Articles