GitHub
📝 36 Prompts
📚 Prompts in this Group
Learn these prompts step by step to master this theme
1
cd my-quizzes
What terminal command do you use to move your current working location into a folder called my-quizzes?
~cd my-quizzes~
2
Force GitHub main to overwrite changes
Git Force Synchronization
What specific Git command is used to discard all local commits and uncommitted changes, effectively forcing your local branch to match the exact state of the main branch on the remote server?
~git reset --hard origin/main~
3
force the specific branch to overwrite GitHub main
What Git command should you use when you need to forcefully update the remote main branch on origin with your local changes, even if it overwrites the remote history?
~git push --force origin main~
4
Get authentication
What GitHub CLI command would you run to start the process of signing in and authenticating your account from the terminal?
~gh auth login~
5
Get Stash
🗄️ Temporarily Save Uncommitted Changes
What Git command lets you temporarily shelve all your uncommitted changes so you can switch tasks or branches with a clean working directory, without losing any of your work?
~Get stash~
6
git branch -d branch_name
What Git command safely deletes a local branch that has already been fully merged, by specifying a short flag followed by the branch name?
~git branch -d branch_name~
7
git branch -D branchname
What Git command forcefully deletes a local branch even if it contains unmerged changes that would otherwise be lost?
~git branch -D~ branchname
10
git clone git@github.com:victorystreamlines/dictionary.git Laragon
What Git command clones a remote repository from GitHub using an SSH URL and places it into a local folder with a custom name of your choice, instead of using the repository's default name?
~git clone~ git@github.com:victorystreamlines/dictionary~.git~ Laragon
11
git commit -m
What Git command do you use to see the exact line-by-line changes made to a specific file since the last commit, without staging or saving anything?
~git commit -m "message"~
12
Git Create Repository
What sequence of terminal commands would you use to check for an existing Git repository, initialize one if needed, stage your files, create the first commit, authenticate with GitHub, and then create and push a new public repository to GitHub from the current folder?
# 1. Check if a git repo already exists
~git status~
# 2. Initialize a new git repository
~git init~
# 3. Stage all files for tracking
~git add .~
# 4. Commit staged files with a message
~git commit -m "Initial commit"~
# 5. Authenticate with GitHub (one-time)
~gh auth login~
# 6. Create the repo on GitHub & link it
~gh repo create <name> --public --source=.~
# 7. Push your code to GitHub
~git push -u origin main~
13
git diff
What Git command do you run to see the exact line-by-line differences between the changes you have made in your working directory and what was last committed, before staging anything?
~git diff~
14
git diff filename
What Git command do you use to see the exact line-by-line changes made to a specific file since the last commit, without staging or saving anything?
~git diff filename~
15
git fetch
What Git command downloads the latest changes from the remote repository to your local machine without automatically merging them into your current working branch?
~git fetch~
16
git log
What Git command do you use to save a snapshot of your staged changes locally, while including a short descriptive message inline that explains what was done?
~git log~
17
git merge branch_name
What Git command do you run while on your main branch to bring in all the changes from another branch into it?
~git merge branch_name~
18
git merge origin/master
What Git command integrates the already-fetched changes from the remote's master branch into your current local branch?
~git merge origin/master~
19
git push
What Git command do you use to upload your locally committed changes from your machine to a remote repository such as GitHub, so that others can see and access your latest work?
~git push~
20
git push origin <your_branch_name>
What Git command uploads your local branch and its commits to the remote repository so others can access your work?
~git push origin <your_branch_name>~
21
git remote -v
What Git command lists all remote connections associated with your local repository, displaying both their names and the full URLs used for fetching and pushing?
~git remote -v~
22
git remote add origin https://github.com/victorystreamlines/abu-amra.git
What Git command connects your existing local repository to a remote GitHub repository for the first time, giving that remote connection the conventional short name used by default in most projects?
~git remote add origin~ https://github.com/victorystreamlines/abu-amra.git
23
git reset --hard <branch_name>
What Git command completely discards all uncommitted changes in your working directory and staging area, resetting everything back to the state of a specific commit or branch?
~git reset --hard~ <branch_name>
24
git reset --hard main
What Git command forcefully resets your current branch to exactly match the state of the main branch, permanently discarding all local uncommitted changes and any commits that are ahead of it?
~git reset --hard main~
25
git reset --soft HEAD~1
Which Git command undoes your most recent commit while keeping all the changes from that commit neatly staged and ready to be re-committed?
~git reset --soft~ HEAD~1
26
git reset commit_SHA
What Git command would you use to move the current branch pointer back to a specific previous commit, identified by its unique hash?
~git reset~ commit_SHA
27
git reset HEAD filename
What Git command do you use to remove a specific file from the staging area after it has been added with git add, without discarding the changes made to that file?
~git reset HEAD filename~
28
git show HEAD
What Git command do you use to view the full details and the specific content changes introduced by the very last commit made in your current branch?
~git show HEAD~
29
git show HEAD Hello.txt
What Git command would you use to inspect the contents of a specific file exactly as it looked in the most recent commit of your repository?
~git show HEAD Hello.txt~
30
git stash list
📦 Git Workflow
📋 See All Your Saved Stash Entries
What Git command displays all the stash entries you have saved, showing each one with its index number and description?
💡 Hint: It is a two-word command — the first word is the Git action for shelving work, and the second word is what you do when you want to see everything stored in a collection.
~git stash list~
31
git stash pop
📦 Git Workflow
🔁 Restore Your Most Recently Stashed Work
What Git command retrieves your most recently stashed changes and re-applies them to your working directory, while also removing that entry from the stash list?
💡 Hint: It is a two-word command — the first word is the Git action for shelving work, and the second word describes the motion of something jumping out from the top of a stack.
~git stash pop~
32
GitHub connect a specific branch to the main branch
What sequence of Git and terminal commands would you use to move into a local project folder, initialize a repository, create the first commit, connect it to a GitHub remote, rename the branch to main, and force push it upstream?
cd "C:\Users\victo\Local Sites\abu-amra"
~git init~
~git add .~
~git commit -m "Initial commit"~
~git remote add origin~ https://github.com/victorystreamlines/abu-amra.git
~git branch -M main~
~git push --force -u origin main~
33
GitHub version
What Windows Package Manager command would you use to see whether the installed package with the exact ID for GitHub CLI appears on your system?
~winget list --id GitHub.cli~
34
Install GitHub
What is the full winget command you would use to install the GitHub CLI by specifying its package identifier?
~winget install --id GitHub.cli~
35
push changes to GitHub
To push changes back to GitHub, you'd need to run git commands manually:
~git add .~
~git commit -m "your message"~
~git push~
36
UnInstall GitHub
What is the complete Windows Package Manager command used to remove the GitHub CLI tool by specifying its exact package identifier?
~winget uninstall --id GitHub.cli~