Getting started with GitHub and GitBash is key for any developer, Here is a quick guide to link the two for a windows O.S.
Initial Steps;
- Install GitBash - https://github.com/LuxDevHQ/Data-Tools-Installation-Guide?tab=readme-ov-file#git-bash
- Set Up a GitHub Account.
-
Create a personal Access Token in GitHub.
steps- click your Profile picture (Top Right)
- Go to settings
- Scrol to Developer settings
- select personal access tokens
- Click Token(classic)
- Click generate new token(classic) -copy and save your token safely(you wont see it again).
open GitHub
create a Project directory.
$ mkdir GitLink
change directory into the created directory.
$ cd GitLink
initialize Git.
$ git init
configure your identity
$ git config --global user.name akellomichael
$ git config --global user.email michaelomondiakello@gmail.com
connect to your GitHub repository.
create a repository on GitHub, then link it:
$ git remote add origin https://github.com/akellomichael/GitHub_GitBash-Connection
Verify the connection:
$ git remote -v
Authenticate Using Your Token.
update the remote URL to include your username and token.
$ git remote set-url origin https://akellomichael:Git_Token@github.com/akellomichael/GitHub_GitBash-Connection
pull all commits(if any) from the remote repo:
$ git fetch origin
create your first file.
$ touch gitlink_doc.md
$ code gitlink_doc.md
Add some content via your default Editor, save and close the file.
Stage the changes.(Add all)
$ git add .
Commit your changes. - create a snapshot of your currently staged project.
$ git commit -m "First Draft"
push to Github
$ git push --set-upstream origin master
subsequent pushes;
$ git push
Hurray!! Your link was successful. GitBash linked to GitHub.

Top comments (0)