简体   繁体   中英

Using Git with an Open Source Project

I have to work on a project to develop a module for the platform MagicMirror² ( https://github.com/MichMich/MagicMirror ), and as I am a beginner with Git I don't know how to do to simply import the files and work with them to test my module.

What I did was to import a repository, but now I see that the project is getting modified regularly, so I suppose this is for people who want to improve it and are pushing their changes.

So what should I do if I simply want to develop my module, while if possible benefiting from the updates of the main project ? Should I import the repository, commit and push my changes of my module, without having the risk to mess up the original project or should I simply make a new repository ?

I also saw these branches, forks "things", I understand the concepts, but I don't know how should I use them.

Thank you

For start, you need to have Git installed. After that, find the repository URL, in your case it's:

https://github.com/MichMich/MagicMirror.git

and do

git clone https://github.com/MichMich/MagicMirror.git

After that, you can simply checkout (create) a new branch:

git checkout -b [branchname]

and work/commit/push on this branch. You will not affect content that is in other branches and while pushing, you will be asked to merge/rebase etc.

Also, keep in mind that git pull -ing new changes might cause damage, read this article to have a deeper understanding.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM