Git Product home page Git Product logo

oop-python-nycu's Introduction

oop-python-nycu

This repo is used for OOP and Advanced OOP courses in NYCU.

Docker

We have a Dockerfile with minimum installations of the packages we will use.

  • Nginx + Flask
  • vim-python-ide
  • pybind11

For first time user or any Dockerfile update

docker pull argnctu/oop:latest

Clone the repo

git clone [email protected]:ARG-NCTU/oop-python-nycu.git

or if you do not have ssh key yet (you should set it up soon)

git clone https://github.com/ARG-NCTU/oop-python-nycu.git

For your first docker terminal:

source docker_run.sh

More terminal:

source docker_join.sh

oop-python-nycu's People

Contributors

bawkbak avatar benjaminpot avatar chienyichieh avatar chihhsunlin102 avatar cookieeikooc avatar ezrafollower avatar hchengwang avatar huihsin-chien avatar jasonchen112101018 avatar kayeedelau avatar kevinrayrayray avatar kingblue5453 avatar leowang707 avatar lonea2005 avatar mattew9410 avatar mike-teng avatar minopeng avatar molafish0712 avatar pinyenchen avatar prophet-wei avatar pulsarglory avatar sunfu-chou avatar tiyang1 avatar uwe77 avatar williamlinnnn avatar xian37 avatar xiang0705 avatar yummypenguin avatar yutingk avatar zhuchi76 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

oop-python-nycu's Issues

Create Pull Requests with Specific Changes of the Repo / Solved

Note: I asked professor for help and he asked me to create an Issue to give more detail of the problem I encountered, but luckily I found the solution, hope this content can help you guys 🫶.

Issue

If the previous commit isn't approved and merged by the repo owner, the next time I commit some changes, the changes will belongs to the previous pull request. To make the pull request commit details less messy, I would have to delete the previous commits and lost all my previous changes, and I wouldn't be able to create a new pull request of the changes on my forked repo without closing my pull request.

Solution

Introduction to Branches

You can treat branches as different versions of your repo with specific changes. It's useful since that you can make changes of the branch, test the branch, and commit without affecting the master branch (or mostly named as "main") of your repo.

What Can We Do with Branches?

Imagine that you and your teammates are working on a project, but each of them have their own changes of the code, to avoid conflicts, you can create (or ask them to) branches for each member of the group, and they commit changes on their branches, creating pull requests which compared their own branches with main branch, and the owner can decide whether or not to merge the commits.

For our OOP lecture, it can solve the issue I'd encountered. By creating branches, I can create a pull request that only has specific changes so that I don't have to make sure that all my previous commits are valid and approved by TAs so that TAs can merge my new commits into the OOP repo owned by our professor without the affect of my previous pull requests.

How to Use Branches

Create a Branch & Create Pull Request Across Specific Remote Branch

  1. Enter your oop folder in terminal by "cd".

  2. Use the command to checkout the present branch you are working:

    git branch -a
    
    image green "main" with a "*" indicates the present branch is main branch, and red branches are remote branches.
  3. To create a new branch, use the command to achieve:

    git branch BranchName
    
    image

    use git branch -a again to list branches, you can see that we have create a branch named "lec-10".

  4. To select branch "lec-10", use command:

    git checkout BranchName
    
    image and now you can see that we are in the branch "lec-10".
  5. Now we can git add, git commit, and git push with only the branch "lec-10" being changed
    image
    note that when you execute git push, making sure you use this commend to make your branch visible online (set as a remote ranch):

    git push --set-upstream origin BranchName
    
    image

    don't care about the number of file that has been committed.

  6. Go to your forked repo, you should see a huge banner asking you to create a pull request:
    image

  7. Click create and you can see that your branch in your forked repo is being compared with the main branch of ARG-NCTU.
    image
    and you can create a pull request under your own control.

To create and checkout the branch at the same time, you can use git checkout -b BranchName

By doing so, you can keep your main branch synced with ARG-NCTU, and only make changes in a branch, keeping your changes organized.

Delete a Branch

Local branch

  1. Go to your main branch first with git checkout main.
  2. Uses command git branch -d BranchName to delete specific local branch.
    image
    image
    You can see that the local branch has been deleted.

Remote branch

  1. Go to your main branch first with git checkout main.
  2. Uses command git push origin -d BranchName to delete specific remote branch.
    image
    image
    You can see that the remote branch had been deleted.

Hope these do help you, 椰.

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.