-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path5_stage
More file actions
16 lines (13 loc) · 777 Bytes
/
5_stage
File metadata and controls
16 lines (13 loc) · 777 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// This page explains how to Stage, and unstage files, folders etc
//STAGE files
// when you make changes to your working directory, you must stage the changes in order to commit them
// you can stage a file with the git add command here is an example
touch new_file // example, in nix* creates a empty text fil
git add new_file //the add new_file to the staging area
git commit -m'added new file' // this commits the newley staged file
//Remove files from tracking
// you can remove a file from being tracked by git with the rm command
git rm filename // this will set up autmatically to remove the file from tracking after the subsequent commit
// UNSTAGE files
// you can unstage files by moving the HEAD
git reset HEAD <file>