Github Transfer Process
Github Transfer Process
**Prerequisites**
* Install Git on your Linux system if you haven't already: `sudo apt-get install git` (for Ubuntu-based
systems) or `sudo yum install git` (for RHEL-based systems).
* Generate a SSH key pair on your Linux system: `ssh-keygen -t rsa -b 4096` (follow the prompts to
create a key pair).
* Add the public key to your GitHub account: Go to your GitHub account settings > SSH and GPG keys
> New SSH key > paste the contents of the `~/.ssh/id_rsa.pub` file.
1. **Initialize a Git repository**: Navigate to the directory containing the files you want to upload
and run `git init`.
2. **Add files to the repository**: Run `git add <file_name>` to stage the files you want to upload.
You can also use `git add .` to stage all files in the directory.
3. **Commit changes**: Run `git commit -m "Initial commit"` to commit the changes with a
meaningful message.
4. **Link your local repository to GitHub**: Run `git remote add origin
https://github.com/your_username/your_repo_name.git` (replace with your GitHub repository
URL).
5. **Push changes to GitHub**: Run `git push -u origin master` to upload the files to your GitHub
repository.
**Tips**
* Use `git config --global user.name "Your Name"` and `git config --global user.email
"your_email@example.com"` to set your Git username and email.
* Use `git config --global credential.helper store` to store your GitHub credentials securely.
* Use `git push --set-upstream origin master` to set the upstream tracking information for the first
time.
By following these steps, you can easily upload and download files to/from GitHub using Linux
command line.