Giter VIP home page Giter VIP logo

rcs's Introduction

Getting Started With Revision Control Software

This GitHub repo is a resource for Software Engineering students to get started with Revision Control Software, specifically, Git. It also covers some GitHub concepts.


Learning Resources

Suggested Git learning sequence
  1. Git overview video: First, watch this to get a quick overview of Git.

  2. Try Git: Now, try this online Git simulation + tutorial to learn Git basics hands-on.

  3. Install SourceTree on your Computer.

    SourceTree comes with Git and a GUI for Git.

  4. Follow this tutorial to try git commands for real.

    Tip: This is how you open a Git command line window from SourceTree

  5. Now you should be ready to start using Git. Here are two more resources to keep in mind:

    • The Pro Git Book: An online version of probably the most popular book on Git.
      Use it as a reference when you want to learn a Git feature in more detail.
    • Use web search to find how to perform a Git task.
      e.g. How to undo a Git commit

Learning Outcomes

Use Git on a local repo [LO-GitLocal]

  • Learn some Git basics by following the Git learning resources given above.
  • Create a local repo with some dummy content.
  • Do some Git stuff on your repo. e.g.
    • Edit some files in the repo, stage the changes, and a commit.
    • Add a new file, stage it, and commit.

Use Git with a remote repo [LO-GitRemote]

Prerequisite: [LO-GitLocal]

Ex : Clone HelloWorld repo
  • Complete the GitHub HelloWorld tutorial.
  • Use SourceTree to clone the HelloWorld repo you created in the previous step.
  • Clone the same remote repo to another location of your computer (let's call the two clones clone1 and clone2).
  • Do some commits in the clone1.
  • push the new commits to your remote repo on GitHub.
  • pull the new commits to your clone2.

Create a PR from fork [LO-PrFork]

Ex: Create PR against this repo

  • Fork this repo to your GitHub account.

  • Clone the fork onto your Computer.

  • Add a text file {YourName}.txt to the users folder e.g. users/JayYong.txt. Add some content to the file. Commit the changes. Suggested commit message Add {YourName}.txt

    It's common practice to write commit message in imperative mood.
    e.g. Add abc.txt rather than Added abc.txt or Adding abc.txt.

  • Push the commit to your fork.

  • Create a PR from your fork to this repo. The PR name should be Add YourFileName e.g. Add JayYong.txt.

  • When the PR is ready, add a comment with the text Ready for review.

Create a PR using GitHub Flow [LO-PrGitHubFlow]

Ex: Create a PR using GitHub Flow

  • Submit an issue in this repo's issue tracker. Issue name Add {YourFullName-Intro.md} e.g. Add JayYong-Intro.md

  • Create a branch in your local clone of this repo with the name add-{YourFullName-Intro-md} e.g. add-JayYong-Intro-md

  • Switch to the new branch.

  • Create a new file named users/YourFullName-Intro.md (e.g. users/JayYong-Intro.md) in your local repo.
    Add some info about yourself to the file and commit the changes in the new branch.

    When adding content to your file, you can use plain text or GitHub Flavored Markdown format in your file.

  • Push the branch to your fork.

  • Go to your fork on GitHub and create a PR for your new branch against the master branch of this repo.

    • PR name: Copy paste the name of the issue you created earlier, including the issue number.
      e.g. Add JayYong-Intro.md #123

      exmaple PR

    • In the PR description, include Fixes #{issue_number} e.g. Fixes #123
      Reason for the above: It instructs GitHub to close the issue automatically when your PR is merged.

  • When the PR is ready, add a comment with the text Ready for review.

Follow the centralized workflow [LO-CentralizedWorkflow]

When working as a team, you need to be able to write code in parallel and merge the code later. There are different workflows you can adopt for this purpose. The centralized workflow is one of the simplest.

Exercise: merge commits using centralized workflow

This is a team exercise.

  • These steps are to be done by only one member of the team.

  • These steps are to be done by all members.

    • Clone the team fork to your computer.
    • While staying in the master, add a new file to the repo with the name /centralized/{YourName}.txt. e.g. centralized/JamesYong.txt
    • Add some content into the file and commit it.
  • Now follow the centralized workflow (see link given above) to push your changes to the team fork.

    • You can ignore references to SVN (in the workflow description). SVN is an older RCS tool. You can also ignore the bit about setting up the repo. As you are using a fork, there is no need to set it up.
    • As team member is editing a different file, there should not be any merge conflicts.

Resolve merge conflicts [LO-MergeConflicts]

This is a team exercise.

Prerequisites: LO-CentralizedWorkflow

  • [Only one member] While staying in the master branch, create a file /centralized/{Team-ID}.txt, commit, and push to the team fork.
  • [All members]
    • Pull the master branch to your clone, add your own name as the first line of the file, and commit. Wait for other members to finish this step.
    • Now try to push to the team fork. This is likely to create merge conflicts. Resolving them will give you an opportunity to learn how to resolve merge conflicts. More instructions about resolving conflicts can be found in the centralized workflow

Contributors


Contact Us

  • Bug reports, Suggestions : Post in our issue tracker if you noticed bugs or have suggestions on how to improve.
  • Contributing : We welcome pull requests. Follow the process described here

rcs's People

Watchers

James Cloos avatar

Forkers

bangwu93

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.