en_natural_language stringlengths 13 134 | corresponding_git_command stringlengths 6 140 |
|---|---|
push my changes | git push |
push the commits to the remote repository | git push |
upload my local commits to the remote | git push |
pull the latest changes | git pull |
get the latest changes from the remote | git pull |
show the current repository status | git status |
check which files have changed | git status |
stage all changed files | git add . |
add all changes to the staging area | git add . |
stage the file app.py | git add app.py |
commit the staged changes with the message fix bug | git commit -m "fix bug" |
create a commit with the message update readme | git commit -m "update readme" |
show the commit history | git log |
display recent commits | git log |
show the differences in unstaged files | git diff |
show what has changed since the last commit | git diff |
create a branch named dev | git branch dev |
make a new branch called feature-login | git branch feature-login |
switch to the dev branch | git switch dev |
change to the main branch | git switch main |
create and switch to a branch named test | git switch -c test |
merge the dev branch into the current branch | git merge dev |
merge feature-login into the current branch | git merge feature-login |
list all local branches | git branch |
show all branches including remote branches | git branch -a |
clone the repository from https://github.com/example/project.git | git clone https://github.com/example/project.git |
remove file.txt from git and the working directory | git rm file.txt |
rename old.txt to new.txt | git mv old.txt new.txt |
show the configured remote repositories | git remote -v |
fetch changes from the remote without merging them | git fetch |
initialize a new git repository in the current folder | git init |
start tracking this project with git | git init |
create a new empty git repository here | git init |
turn this directory into a git repository | git init |
set up a fresh git repo | git init |
create a new git repository in a folder called my-project | git init my-project |
initialize an empty git repository in the docs directory | git init docs |
begin version control for this project | git init |
make this folder a git repository | git init |
initialize git with the main branch as default | git init -b main |
initialize a repository whose initial branch is called trunk | git init -b trunk |
clone the repository at git@github.com:user/repo.git | git clone git@github.com:user/repo.git |
download a copy of the repo from https://github.com/user/repo.git | git clone https://github.com/user/repo.git |
clone https://github.com/user/repo.git into a directory named myapp | git clone https://github.com/user/repo.git myapp |
clone https://github.com/user/repo.git to my machine | git clone https://github.com/user/repo.git |
clone only the most recent commit of https://github.com/user/repo.git | git clone --depth 1 https://github.com/user/repo.git |
make a shallow clone of the upstream repo at https://github.com/user/repo.git | git clone --depth 1 https://github.com/user/repo.git |
clone https://github.com/user/repo.git with all of its submodules | git clone --recurse-submodules https://github.com/user/repo.git |
clone https://github.com/user/repo.git including its submodules | git clone --recurse-submodules https://github.com/user/repo.git |
clone only the main branch of https://github.com/user/repo.git | git clone --single-branch --branch main https://github.com/user/repo.git |
clone https://github.com/user/repo.git and check out the develop branch | git clone -b develop https://github.com/user/repo.git |
get a local copy of https://github.com/user/repo.git | git clone https://github.com/user/repo.git |
clone the repository from https://github.com/me/repo.git | git clone https://github.com/me/repo.git |
clone https://github.com/user/repo.git locally | git clone https://github.com/user/repo.git |
clone git@github.com:user/repo.git over ssh | git clone git@github.com:user/repo.git |
set my git username to john doe | git config user.name "john doe" |
set the commit author name to john doe for this repository | git config user.name "john doe" |
set my email address to john@example.com for git commits | git config user.email "john@example.com" |
configure john@example.com as the email used in my commits | git config user.email "john@example.com" |
set my git identity name to john doe globally | git config --global user.name "john doe" |
save john@example.com as my git email in the global config | git config --global user.email "john@example.com" |
set the default git editor to vim | git config --global core.editor vim |
make vim my default git editor for core.editor | git config --global core.editor vim |
show all git configuration settings | git config --list |
list my current git configuration | git config --list |
show the global git config | git config --global --list |
tell git to use the name john doe for my commits globally | git config --global user.name "john doe" |
set the config init.defaultbranch so new repositories default to main | git config --global init.defaultBranch main |
configure git to remember my credentials with the store helper | git config --global credential.helper store |
enable git to cache my login credentials | git config --global credential.helper cache |
set the default push behavior to simple | git config --global push.default simple |
set core.autocrlf to true so git treats line endings properly on windows | git config --global core.autocrlf true |
set core.autocrlf to input for linux | git config --global core.autocrlf input |
set the pull.rebase config to true | git config --global pull.rebase true |
configure pull.rebase so pulls rebase instead of merge by default | git config --global pull.rebase true |
open the git configuration file in an editor | git config --global --edit |
check what my git username is set to | git config user.name |
show the configured user email | git config user.email |
add a remote named origin pointing to https://github.com/user/repo.git | git remote add origin https://github.com/user/repo.git |
connect my local repo to the github remote at https://github.com/user/repo.git | git remote add origin https://github.com/user/repo.git |
register a new remote called upstream at https://github.com/original/repo.git | git remote add upstream https://github.com/original/repo.git |
add the original repository as an upstream remote | git remote add upstream https://github.com/original/repo.git |
show the list of remotes | git remote |
list the remote repositories connected to this repo | git remote |
show remotes with their urls | git remote -v |
display the fetch and push urls of my remotes | git remote -v |
remove the remote named origin | git remote remove origin |
delete the origin remote | git remote remove origin |
delete the remote called upstream | git remote remove upstream |
change the url of the origin remote to https://github.com/user/newrepo.git | git remote set-url origin https://github.com/user/newrepo.git |
update the origin remote to point to https://github.com/user/newrepo.git | git remote set-url origin https://github.com/user/newrepo.git |
rename the remote origin to upstream | git remote rename origin upstream |
rename a remote repository reference | git remote rename origin upstream |
show details about the origin remote | git remote show origin |
check the health of the origin remote | git remote show origin |
add a second remote named backup at https://github.com/user/backup.git | git remote add backup https://github.com/user/backup.git |
push my commits to origin | git push |
send my local commits to the remote repository | git push |
upload my work to github | git push |
publish my commits on the remote | git push |
Git Natural Language Commands
A dataset mapping English natural-language instructions to their corresponding git commands, intended for training and evaluating models that translate user intent into safe, correct shell commands.
Disclaimer: This dataset was generated using Large Language Models (LLMs). The examples have not been manually verified against real-world usage and may contain errors, inconsistencies, or non-canonical phrasings. Use with appropriate caution.
Dataset Summary
- Rows: 1,050
- Languages: English (
en) - Format: CSV with two columns
- Coverage: Common git workflows — init, clone, add/commit, push/pull/fetch, branching, checkout/switch, log/diff/show, blame, merge, rebase, cherry-pick, revert, reset, restore, stash, tags, clean, reflog, grep, bisect, worktrees, submodules, archive/patches, config, remotes, and more.
- Note: All pairs are based on the latest Git CLI syntax (e.g.,
git switch/git restorerather than older overloadedgit checkoutusage where applicable).
Intended Usage
This dataset is designed for:
- Fine-tuning or evaluating LLMs that convert natural-language instructions into shell commands (text-to-command / NL2Bash-style tasks).
- Building safe command-suggestion features for developer tools, terminals, or assistants.
- Benchmarking text2text models on intent-to-CLI translation.
- Prototyping intent classifiers that map user requests to specific git subcommands.
Example training objective: given en_natural_language as input, generate corresponding_git_command as output.
Dataset Format
CSV file (git_nl_command_test.csv) with a header row and two quoted string columns:
| Column | Type | Description |
|---|---|---|
en_natural_language |
string | An English instruction describing a desired git action. |
corresponding_git_command |
string | The equivalent git command to accomplish that action. |
Example rows:
| en_natural_language | corresponding_git_command |
|---|---|
push my changes |
git push |
create a branch named dev |
git branch dev |
commit the staged changes with the message fix bug |
git commit -m "fix bug" |
force push but keep the remote branch safe with a lease |
git push --force-with-lease |
stash including untracked files |
git stash -u |
Example Usage
from datasets import load_dataset
ds = load_dataset("burak29/git-natural-language-commands", split="test")
print(ds[0])
# {'en_natural_language': 'push my changes', 'corresponding_git_command': 'git push'}
for ex in ds.select(range(3)):
print(f"{ex['en_natural_language']!r} -> {ex['corresponding_git_command']!r}")
Limitations
- LLM-generated: As stated in the disclaimer, examples were produced with LLMs and may include phrasing or command inaccuracies; always review predictions before executing them.
- English only: No multilingual coverage.
- Single-reference: Each instruction maps to one canonical command; many git actions have multiple valid invocations that are not represented.
- No context: Instructions assume a generic repository state; real-world execution may require arguments (paths, hashes, remotes) that are not inferable from the input.
- Dangerous commands included: Pairs contain destructive commands (e.g.,
git reset --hard,git push --force,git clean -fdx). Any system consuming this data should include safety guardrails and user confirmation before executing commands. - Not executable as-is in all environments: Some examples reference placeholder repos, users, or commits (
user/repo,abc1234). - Shell constructs: A small number of rows (~24) embed shell syntax (pipes,
&&,$(...),xargs) around git commands rather than being single git invocations.
License
This dataset is released under the MIT License. See LICENSE for the full text.
Citation
If you use this dataset, please cite it as:
@dataset{git_natural_language_commands,
author = {burak29},
title = {Git Natural Language Commands},
year = {2026},
url = {https://huggingface.co/datasets/burak29/git-natural-language-commands},
note = {Generated using LLMs}
}
- Downloads last month
- 30