Saturday, September 19, 2015

Git and Github work together

  1. Create a GitHub repository
  2. Clone the repository to a local directory
  3. Work on your local repo, such as modifying or adding files
  4. Use 'git add' to add intended files to the local repo
  5. Use 'git commit -m to commit the changes
  6. Push local data to the remote location (GitHub)
By cloning the repository, a local repo will be initiated.
If you make changes directly via GitHub, there could be mismatch between the local and the remote repo.  You can use the pull command to merge the changes.


No comments: