This is an altered version of content spit out from ChatGPT
If you haven't already, install Git on your computer. You can download it from the official website: Git
Each commit (version) created contains some data, including the previous version, the time of creation, but also logs the name and email of the author. This information does not need to be real however if this information matches your GitHub account, then the commits will be associated to your account on GitHub when viewed on the site.
Open a terminal or command prompt and set up your Git username and email address using the following commands:
git config --global user.name "Your Name"
git config --global user.email "your_email@example.com"
Create a new directory for your project and navigate into it:
mkdir my-project
cd my-project
Initialize a new Git repository:
git init
Create some files in your project directory. For example, let's create a README.md file:
echo "# My Project" >> README.md
You can also just create from the file browser, or any other way you like.
Add the files you want to track to the staging area:
git add README.md
Commit the changes to your local repository:
git commit -m "Initial commit"
Make further changes to your files if desired. For example, let's add some content to README.md:
echo "This is my first project using Git." >> README.md
Add and commit these changes:
git add README.md
git commit -m "Added content to README.md"
Try some of these commands in your next commits:
git add -A
To add everything*
git commit -am "<message>"
To stage changes to tracked files and commit in one go.
Go to GitHub and sign in (or create an account if you don't have one).
Create a new repository on GitHub. Give it a name, optionally add a description, and choose other settings as needed.
After creating a new blank repository, you should receive instructions to push an existing repository, follow them.
Go back to your GitHub repository in your browser and refresh the page. You should see your files there.
That's it! You've now created a Git repository, made some commits, and published it to GitHub.