- We will be using Git for local repository.
- For today and next session, assume we have one user and one system.
- Installing Git on Windows: Follow classroom recording
Create a folder and make this a local repo using git
- Create a folder anywhere on your system
mdkir c:\gitpractice cd c:\gitpractice mkdir hellogit cd hellogit
- on *nix systems
mkdir -p /tmp/gitpractice/hellogit cd /tmp/gitpractice/hellogit
- To create a local repo using a initalize command
- Current state
- For the changes to be versioned we need to have the changes in local repo.
- We work on working tree
- move the changes to staging area
- move the changes from staging area to local repo
- once the changes are in local repo we have some version, who has done the change, when the change was done, changes
- Lets create a main.py in src folder and ask for status
- lets add the changes
- Lets commit the changes
- Git asks for who you are, configure email and username. Then commit
- Now check the status
- Working tree clean represents your working tree has no changes over and top of what is present in your local repo.
- Lets check history
- Lets add one more change