Star

Created With

linkWriting your first commit

linkClone from GitHub repo

1link$git clone https://github.com/beauwilliams/yourfirstcommit

2link$cd yourfirstcommit

linkMake a new file

1link$echo "My first commit!" > commit.txt

linkGet the output of git status, commit.txt is untracked

1link$git status

linkStage the new file

1link$git add commit.txt

2link$

3link$# OR add all untracked files at once using the . operator

4link$git add .

linkVerify commit has been staged with git status, commit.txt is "to be committed"

1link$git status

linkCommit the changes in your staging area to the repository

1link$git commit -m "Added commit.txt. My first commit :D"

linkPush the local changes to the remote server

1link$git push

linkGet your commit history

1link$git log

Writing your first commitClone from GitHub repoMake a new fileGet the output of git status, commit.txt is untrackedStage the new fileVerify commit has been staged with git status, commit.txt is "to be committed"Commit the changes in your staging area to the repositoryPush the local changes to the remote serverGet your commit history
Content

Home Backstory Why Git? Setting Up GitHub GitHub CLI Your GitHub Profile GitHub Pages Creating A New Repo Cloning A Repository Your First Commit Ignoring Files In Git Stashing Your Changes Branching With Git Merging Git Branches Rebasing Vs Merging Git Workflows Fork And Pull Flow Your First Pull Request Automated Security Alerts Seeing The Differences Removing/Deleting Files Reverting Your Commits Configuring your Git Commit Templates Creating Shortcuts Dotfile Management Sponsoring Open Source Handy Commands Thank You



Developer Student Clubs

logo2.png