{"id":26140841,"url":"https://github.com/yj-928/github_how-to-use-git-bash","last_synced_at":"2026-04-06T21:31:13.223Z","repository":{"id":80349662,"uuid":"551979401","full_name":"YJ-928/GitHub_How-to-use-Git-Bash","owner":"YJ-928","description":"git-bash simplified for you.","archived":false,"fork":false,"pushed_at":"2025-03-04T05:15:18.000Z","size":166,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-27T08:50:43.225Z","etag":null,"topics":["bash","bash-script","git","github","how-to"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/YJ-928.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-10-15T14:34:31.000Z","updated_at":"2025-03-04T05:15:22.000Z","dependencies_parsed_at":"2025-03-04T06:24:10.088Z","dependency_job_id":"973c4853-387a-4712-8f96-0babb1fc00bc","html_url":"https://github.com/YJ-928/GitHub_How-to-use-Git-Bash","commit_stats":null,"previous_names":["yj-928/github_how-to-use-git-bash"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/YJ-928/GitHub_How-to-use-Git-Bash","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YJ-928%2FGitHub_How-to-use-Git-Bash","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YJ-928%2FGitHub_How-to-use-Git-Bash/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YJ-928%2FGitHub_How-to-use-Git-Bash/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YJ-928%2FGitHub_How-to-use-Git-Bash/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/YJ-928","download_url":"https://codeload.github.com/YJ-928/GitHub_How-to-use-Git-Bash/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YJ-928%2FGitHub_How-to-use-Git-Bash/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31491096,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-06T17:22:55.647Z","status":"ssl_error","status_checked_at":"2026-04-06T17:22:54.741Z","response_time":112,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bash","bash-script","git","github","how-to"],"created_at":"2025-03-11T02:57:41.708Z","updated_at":"2026-04-06T21:31:13.186Z","avatar_url":"https://github.com/YJ-928.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"![GitBash](https://img.shields.io/badge/GIT%20BASH-How%20to%20use%20Git%20Bash-important?style=flat)\n![Git](https://img.shields.io/badge/Git-F05032.svg?style=flat\u0026logo=Git\u0026logoColor=white)\n# How to use Git Bash (Simplified for you):\n\n## How to check your Git configuration:\n#### The command below returns a list of information about your git configuration including user name and email:\n## git config -l (Small l, as in London)\n\n## How to setup your Git username:\n#### With the command below you can configure your user name:\n## git config --global user.name \"Your-User-Name_here\"\n\n## How to setup your Git user email:\n#### This command lets you setup the user email address you'll use in your commits.\n## git config --global user.email \"your_email_here@Mail-Host.com\"\n\n## How to cache your login credentials in Git:\n#### You can store login credentials in the cache so you don't have to type them in each time. Just use this command:\n## git config --global credential.helper cache\n\n## How to initialize a Git repo:\n#### Everything starts from here. The first step is to initialize a new Git repo locally in your project root. You can do so with the command below:\n## git init\n\n## How to add a file to the staging area in Git:\n#### The command below will add a file to the staging area. Just replace filename_here with the name of the file you want to add to the staging area.\n## git add filename_here\n\n## How to add all files in the staging area in Git\n#### If you want to add all files in your project to the staging area, you can use a wildcard . and every file will be added for you.\n## git add .\n\n## How to add only certain files to the staging area in Git\n#### With the asterisk in the command below, you can add all files starting with 'fil' in the staging area.\n## git add fil*\n\n## How to check a repository's status in Git:\n#### This command will show the status of the current repository including staged, unstaged, and untracked files.\n## git status\n\n## How to commit changes in the editor in Git:\n#### This command will open a text editor in the terminal where you can write a full commit message.\n#### A commit message is made up of a short summary of changes, an empty line, and a full description of the changes after it.\n## git commit\n\n## How to commit changes with a message in Git:\n#### You can add a commit message without opening the editor. This command lets you only specify a short summary for your commit message.\n## git commit -m \"your commit message here\"\n\n## How to commit changes (and skip the staging area) in Git:\n#### You can add and commit tracked files with a single command by using the -a and -m options.\n## git commit -a -m\"your commit message here\"\n\n### How to see your commit history in Git:\n#### This command shows the commit history for the current repository:\n## git log\n\n## How to see your commit history including changes in Git:\n#### This command shows the commit's history including all files and their changes:\n## git log -p\n\n## How to see a specific commit in Git:\n#### This command shows a specific commit.\n#### Replace commit-id with the id of the commit that you find in the commit log after the word commit.\n## git show commit-id\n\n## How to see log stats in Git:\n#### This command will cause the Git log to show some statistics about the changes in each commit, including line(s) changed and file names.\n## git log --stat\n\n## How to see changes made before committing them using \"diff\" in Git:\n#### You can pass a file as a parameter to only see changes on a specific file.\n#### git diff shows only unstaged changes by default.\n#### We can call diff with the --staged flag to see any staged changes.\n## git diff\n## git diff all_checks.py\n## git diff --staged\n\n## How to see changes using \"git add -p\":\n#### This command opens a prompt and asks if you want to stage changes or not, and includes other options.\n## git add -p\n\n## How to remove tracked files from the current working tree in Git:\n#### This command expects a commit message to explain why the file was deleted.\n## git rm filename\n\n## How to rename files in Git:\n#### This command stages the changes, then it expects a commit message.\n## git mv oldfile newfile\n\n## How to ignore files in Git:\n## Create a .gitignore file and commit it.\n\n## How to revert unstaged changes in Git:\n## git checkout filename\n\n## How to revert staged changes in Git:\n#### You can use the -p option flag to specify the changes you want to reset.\n## git reset HEAD filename\n## git reset HEAD -p\n\n## How to amend the most recent commit in Git:\n## git commit --amend allows you to modify and add changes to the most recent commit.\n## git commit --amend\n#### !!Note!!: fixing up a local commit with amend is great and you can push it to a shared repository after you've fixed it. But you should avoid amending commits that have already been made public.\n\n## How to rollback the last commit in Git:\n#### git revert will create a new commit that is the opposite of everything in the given commit.\n#### We can revert the latest commit by using the head alias like this:\n## git revert HEAD\n\n## How to rollback an old commit in Git:\n#### You can revert an old commit using its commit id. This opens the editor so you can add a commit message.\n## git revert comit_id_here\n\n## How to create a new branch in Git:\n#### By default, you have one branch, the main branch. With this command, you can create a new branch. Git won't switch to it automatically – you will need to do it manually with the next command.\n## git branch branch_name\n\n## How to switch to a newly created branch in Git:\n#### When you want to use a different or a newly created branch you can use this command:\n## git checkout branch_name\n\n## How to list branches in Git:\n#### You can view all created branches using the git branch command. It will show a list of all branches and mark the current branch with an asterisk and highlight it in green.\n## git branch\n\n## How to create a branch in Git and switch to it immediately:\n#### In a single command, you can create and switch to a new branch right away.\n## git checkout -b branch_name\n\n## How to delete a branch in Git:\n#### When you are done working with a branch and have merged it, you can delete it using the command below:\n## git branch -d branch_name\n\n## How to merge two branches in Git:\n#### To merge the history of the branch you are currently in with the branch_name, you will need to use the command below:\n## git merge branch_name\n\n## How to show the commit log as a graph in Git:\n#### We can use --graph to get the commit log to show as a graph. Also,\n#### --oneline will limit commit messages to a single line.\n## git log --graph --oneline\n\n## How to show the commit log as a graph of all branches in Git:\n#### Does the same as the command above, but for all branches.\n## git log --graph --oneline --all\n\n## How to abort a conflicting merge in Git:\n#### If you want to throw a merge away and start over, you can run the following command:\n## git merge --abort\n\n## How to add a remote repository in Git\n#### This command adds a remote repository to your local repository (just replace https://repo_here with your remote repo URL).\n## git add remote https://repo_here\n\n## How to see remote URLs in Git:\n#### You can see all remote repositories for your local repository with this command:\n## git remote -v\n\n## How to get more info about a remote repo in Git:\n#### Just replace origin with the name of the remote obtained by running the git remote -v command\n## git remote show origin\n\n## How to push changes to a remote repo in Git:\n#### When all your work is ready to be saved on a remote repository, you can push all changes using the command below:\n## git push\n\n## How to pull changes from a remote repo in Git:\n#### If other team members are working on your repository, you can retrieve the latest changes made to the remote repository with the command below:\n## git pull\n\n## How to check remote branches that Git is tracking:\n#### This command shows the name of all remote branches that Git is tracking for the current repository:\n## git branch -r\n\n## How to fetch remote repo changes in Git:\n#### This command will download the changes from a remote repo but will not perform a merge on your local branch (as git pull does that instead).\n## git fetch\n\n## How to check the current commits log of a remote repo in Git\n#### Commit after commit, Git builds up a log. You can find out the remote repository log by using this command:\n## git log origin/main\n\n## How to merge a remote repo with your local repo in Git:\n#### If the remote repository has changes you want to merge with your local, then this command will do that for you:\n## git merge origin/main\n\n## How to get the contents of remote branches in Git without automatically merging:\n#### This lets you update the remote without merging any content into the\n#### local branches. You can call git merge or git checkout to do the merge.\n## git remote update\n\n## How to push a new branch to a remote repo in Git:\n#### If you want to push a branch to a remote repository you can use the command below. Just remember to add -u to create the branch upstream:\n## git push -u origin branch_name\n\n## How to remove a remote branch in Git:\n#### If you no longer need a remote branch you can remove it using the command below:\n## git push --delete origin branch_name_here\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyj-928%2Fgithub_how-to-use-git-bash","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyj-928%2Fgithub_how-to-use-git-bash","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyj-928%2Fgithub_how-to-use-git-bash/lists"}