Git allows you to track changes to a repository on your local machine. This can provide organization to a large project. Git in combination with Github allows a team of people to work on a project.
git init
Initializes file for trackinggit add <file>
Adds file to staging areagit commit -m 'message'
Commits changes with messagegit push
Pushes changes to remote repository
- Directory Initialized
- Directory Unmodified
- Changes Made To Files(modified)
- Add changes To Staging Area
- Commit Changes To Repository
- Directory Returns to Unmodified
Do Not Clone Repositories into Existing Git Directories
If you submit a change to a fork, you must open a pull request to merge it with master branch
Introduction To Git.
501 cd Documents/git_and_gh_practice/
502 ls
503 echo 'Another hobby of mine is mountain biking.' >> hobbies.txt
504 cat hobbies.txt
505 git add hobbies.txt
506 git commit -m 'Add Hobby'
507 git push
Branching a repository creates a copy of a project that is not linked to the master repo. So you can experiment and make changes freely. Once you are confident that your changes are ready to be added to the master repository, a pull request can be submitted. This signals that your code is ready to be merged with the master branch. This is useful because it allows many people to work on different areas of a project simultaneously. It also splits the project into smaller pieces making it easier to track the changes in the project as it progresses.