Skip to content

A git practice repository where you can make as many mistakes as you'd like and learn git on the way. Feel free to make pull requests about anything.

Notifications You must be signed in to change notification settings

Veo20/hello-git

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 

Repository files navigation

Hello Git!

Welcome to NOW's practice git repository where you can make as many mistakes as you'd like and learn git while doing it. Feel free to make and send us pull requests about anything and discover how git and github work.

Useful Links

Instructions

It's as easy as 5 steps.

  • Fork this repository
  • Make a new branch in your fork
  • Add stuff to your branch
  • Commit your changes
  • Send us a pull request!

You can use the Git CLI or the GitHub interface to complete these tasks.

Common Git commands

  • Clone a Git repository

git clone https://github.com/username/repository

Replace username and repository with the details of the repository you want to clone.

  • Add files

To add a single file with name filename

git add <filename>

To add a list of files

git add <list of files>

Example: git add file1.txt file2.txt file3.txt

To add all files that have changed. git add --all can also be used.

git add .
  • Remove files

git rm <filename>

rm command can be used like the add command to remove multiple files at once by providing a list of files to be removed.

  • Get status of the files that have been modified and staged

git status -s

(M) - Modified, (A) - Added, (AM) - File hasn't been altered since it was last added

  • Commit all files that have been staged

git commit -m "your commit message here"
  • View commit history

git log

To get all changes that have been committed so far, in the order that they have been committed in do git log --summary

  • Get staged differences and displays what has changed since our last commit

git diff --staged
  • Pull changes from remote repository and sync your local repository

git pull
  • Pulls changes from origin repository but doesn't merge them

git fetch
  • Make a new branch

git branch <branchname>
  • Merge branches into master

git merge <branchname>
  • Delete a branch

git branch -d <branchname>
  • List all remote branches

git branch -r
  • Help

git help

About

A git practice repository where you can make as many mistakes as you'd like and learn git on the way. Feel free to make pull requests about anything.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published