Menu

Useful Git Bash Commands
📰

Useful Git Bash Commands

DEV Community: github·Matt Drummond·about 6 hours ago
#x6deWCuN
#devtogithub#technology#devto#dev#branch
Reading 0:00
15s threshold

With tools like Git Desktop and Git for vscode, having a basic understanding of git bash can still be very beneficial. It's also great to have alternatives in your workflow.

Here are some everyday commands that I find helpful.

Commands that reveal

ls -a # List files and folders within directory git status # See what's changed on current directory

git diff # Shows un-staged & staged difference git diff --staged # Shows staged & most recent commit difference

git log --oneline # Displays each commit on one line git log --oneline --parents # Shows parent-child relationship in log

Enter fullscreen mode

Exit fullscreen mode

Create a new git repository

cd ..…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.