일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 |
- train/test
- Default X points
- line width
- break
- MySQL
- multiple lines
- pie charts
- Text mining
- polynomial regression
- PANDAS
- Python
- line color
- PROJECT
- iterates
- start exercise
- continue
- self parameter
- variables
- error
- matplotlib
- Text Analytics
- For loops
- matplotlib.pyplot
- __init__
- Else
- AS
- Github
- SQL
- machine learning
- data distribution
- Today
- Total
Data Science Explorer
How To Upload A Folder On GitHub: A Step-by-Step Guide 본문
# Step 1: Create a GitHub Account
If you don't already have a GitHub account, head to the GitHub website (github.com) and sign up for a new account. It's a straightforward process that requires only an email address and password.
# Step 2: Create a New Repository
Once you have a GitHub account, log in to your account and click on the "+" icon in the top-right corner of the page. From the dropdown menu, select "New repository." Give your repository a name and optional description, and choose whether you want it to be public or private. Finally, click on the "Create repository" button. You can get to choose if you want your repository to public or private. Additionally, you can choose the language on
"Add .gitignore" section.
# Step 3: Set up Git
To upload your folder to GitHub, you'll need to have Git installed on your computer. If you haven't installed it already, head to the Git website (gitscm.com) and download the appropriate version for your operating system. After installation, open your terminal (on macOS and Linux) or Git Bash (on Windows).
# Step 4: Navigate to Your Folder
Using the terminal or Git Bash, navigate to the location of the folder you want to upload to GitHub. You can use the
'cd 'command to change directories, like this:
$ cd path/to/your/folder
Tip: You do not need to type every single letters of the name of the folder. All you need to do is to type the first two letters and press "Tab" and the rest will pop out.
# Step 5: Initialize Git Repository
Once you are inside the folder, you need to initialize a Git repository. Run the following command:
$ git init
This will create a new Git repository in your folder.
# Step 6: Add Files to the Repository
Next, you need to add the files in your folder to the Git repository. Use the following command:
$ git add .
The period (".") after 'git add' means you want to add all the files and subfolders in the current directory to the staging area.
# Step 7: Commit the Changes
After adding the files, you need to commit the changes. A commit is like a snapshot of the changes you have made. Use the following command:
$ git commit -m "Initial commit"
You can replace "Initial commit" with a brief description of the changes you are making. This helps you track the
changes you've made over time.
# Step 8: Connect to Your GitHub Repository
Now that you have committed your changes, you need to connect your local Git repository to the GitHub repository
you created earlier. Use the following command:
$ git remote add origin your_github_repository_url.git
Replace "your_github_repository_url.git" with the URL of your GitHub repository. You can find this URL on your GitHub repository page, under the "Code" tab.
# Step 9: Push the Changes
Finally, it's time to push the changes from your local Git repository to the GitHub repository.
Use the following command:
$ git push -u origin master
This will push the changes in the "master" branch or "main" branch of your local repository to the "master" branch of your GitHub repository.
# Step 10: Verify the Upload
Visit your GitHub repository page on the GitHub website and navigate to the "Code" tab. You should see the folder
and its contents listed there. Congratulations! You have successfully uploaded a folder to GitHub.
'GitHub' 카테고리의 다른 글
How to fix the Error git@github.com: Permission denied (publickey). (0) | 2023.11.01 |
---|---|
GitHub Command Words That You Must Know (0) | 2023.08.02 |
GitHub vs. Git (0) | 2023.08.01 |