Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change copyright to "Copyright (c) 2014-present Artsy, Ash Furrow" #1523

Merged
merged 1 commit into from
Jan 3, 2018

Conversation

richgabrielli
Copy link

No description provided.

@codecov-io
Copy link

Codecov Report

Merging #1523 into master will increase coverage by 0.73%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1523      +/-   ##
==========================================
+ Coverage   87.67%   88.41%   +0.73%     
==========================================
  Files          24        5      -19     
  Lines        1063      164     -899     
  Branches       96        0      -96     
==========================================
- Hits          932      145     -787     
+ Misses        129       19     -110     
+ Partials        2        0       -2
Impacted Files Coverage Δ
Sources/RxMoya/Observable+Response.swift 70.58% <0%> (-3.49%) ⬇️
Sources/RxMoya/MoyaProvider+Rx.swift 91.66% <0%> (-2.46%) ⬇️
Sources/ReactiveMoya/MoyaProvider+Reactive.swift 91.89% <0%> (-2.34%) ⬇️
Sources/RxMoya/Single+Response.swift 100% <0%> (ø) ⬆️
Sources/Moya/Endpoint.swift
Sources/Moya/Plugins/NetworkLoggerPlugin.swift
Sources/Moya/Plugins/NetworkActivityPlugin.swift
Sources/Moya/MoyaError.swift
Sources/Moya/URL+Moya.swift
Sources/Moya/MultipartFormData.swift
... and 14 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 03d9d62...764c5a0. Read the comment docs.

@SD10 SD10 merged commit 1b7c66b into Moya:master Jan 3, 2018
@ashfurrow
Copy link
Member

Thanks a lot for contributing to Moya! I've invited you to join the Moya GitHub organization – no pressure to accept! If you'd like more information on what that means, check out our contributor guidelines and feel free to reach out with any questions.

@richgabrielli
Copy link
Author

Thanks @ashfurrow! I am very new to GitHub. My local repository now says "This branch is 1 commit behind Moya:master." This has happened on another project that I forked and pulled. I have tried everything except the correct process to get in sync. Do you have any ideas? Thanks!

@BasThomas
Copy link
Contributor

If you clone Moya/Moya (instead of your fork), you can simply git pull to get up-to-date @richgabrielli

Sent with GitHawk

@richgabrielli
Copy link
Author

Thanks @BasThomas. Do I delete current fork? Should I never fork?

@BasThomas
Copy link
Contributor

If you don’t have push access to a repository, you have to fork. So for this PR you created you made a fork, but as you now have push access to Moya, you no longer need it.

So yes - you can delete the current fork. And no - you have to fork if you do not have push access to a repository.

Sent with GitHawk

@richgabrielli
Copy link
Author

richgabrielli commented Jan 3, 2018

@BasThomas Thanks! So for a workflow starting with a new project:

  • Fork repository
  • Modify and submit PR
  • Once accepted: delete fork and then clone

Edit: Tried to get started...Easier said than done. Can you give an assist on the actual process from Github and/or terminal?

For example: I had all my 3 of my repositories on GitHub synced to the main master repository and they all stated that they were even. Now one of the three is 2 commits behind. What do I do?

screen shot 2018-01-03 at 4 41 41 pm

@SD10
Copy link
Member

SD10 commented Jan 3, 2018

You need to add a new remote, traditionally called upstream that reflects the original repo:
git remote add upstream https://github.com/Moya/Moya.git

Then check that you have them setup:
git remote -v

Then you need to fetch the new commits from the original repo, upstream:
git fetch upstream master <-- or another branch if you want, ie) development

Then you need to merge those changes from upstream into origin (your local copy):
git merge upstream/master

Sometimes you may need to rebase and not merge. You'll want to learn about the difference between the two.

Note: Moya has unique contributing guidelines. Thus, you're able to work from the original repo after having your first PR merged in. However, this is the workflow you will need to use for other projects that you're not a member of.

@ashfurrow
Copy link
Member

Nearly! You don't really have to fork and re-clone (though that will work too).

Your fork was made at a specific time, and to continue making pull requests to Moya, you need to "update" your fork, so that it knows about all the commits to Moya since you made the fork. This is actually pretty easy to do, but uses confusing terminology, isn't well documented, and is a bit of "assumed knowledge" that no one usually teaches.

So. How do update your fork? We need to be in the terminal and we're going to clone your fork.

(One note: I'm using HTTP urls for GitHub in these examples, but you can use SSH urls that begin with git@ instead and everything should work.)

> git clone https://github.com/richgabrielli/Moya.git

Next we'll change directories to go into the forked repo:

> cd Moya

Okay, so this folder is "pointing to" your fork. The name for this is "origin" and you can see it by asking git for all the remotes it knows about:

> git remote -v
origin  https://github.com/richgabrielli/Moya.git (fetch)
origin  https://github.com/richgabrielli/Moya.git (push)

Okay so we want to point your git to Moya's original repo. This is process is called adding it as a remote. We'll need to give the remote a name, and the convention is to call it "upstream".

> git remote add upstream https://github.com/Moya/Moya.git

Now verify that both origin and upstream are printed when you run git remote -v.

Alright so now all you have to do is pull upstream changes from Moya and then push those exact changes to your fork (remember, everything you've typed into the terminal operates on your local git, not the remote fork). So we can pull changes from Moya and push them to your remote with the following two commands:

> git pull upstream master
> git push origin master

And that should do it!

One word of caution: it's really important that your fork's master branch only ever has commits in it that are also in Moya's upstream master branch. All you need to do to avoid problems is: always work on branches. Whenever you start new work, pull the latest from Moya's upstream and then check out a new branch:

> git checkout -b my-new-branch-name

I hope that helps – let me know what I can clarify. Welcome to the project, by the way!

@SD10
Copy link
Member

SD10 commented Jan 3, 2018

@richgabrielli You can ignore my post and just read Ash's

@ashfurrow
Copy link
Member

They're both good! They're good posts Steven.

@richgabrielli
Copy link
Author

PERFECT!!!! Thanks @ashfurrow @SD10 and @BasThomas. I think I got it.

The biggest thing (I think) is that I was missing was the "git push origin master" as the last step to get my local branch synced up to the my repository on the GitHub website!

You all were very welcoming and patient with some pretty basic issues I was having. I look forward to being more active!

@richgabrielli
Copy link
Author

Last thing: could you expand on the last part:
screen shot 2018-01-03 at 5 03 24 pm

@SD10
Copy link
Member

SD10 commented Jan 3, 2018

Awesome to hear @richgabrielli! I faced similar struggles and wouldn’t have gotten involved in open source if people weren’t patient and supporting. Please remember this experience if you see the opportunity to help another GitHub user one day 🤗

Sent with GitHawk

@ashfurrow
Copy link
Member

Certainly. That command creates a new branch called my-new-branch-name and then checks out that branch. You can do the same with the following two commands, which you'll see sometimes in documentation or tutorials:

> git branch my-new-branch-name
> git checkout my-new-branch-name

On a higher level, working on features or fixing bugs generally follows the following steps:

  1. Checkout the master branch.
  2. Pull changes from the upstream's master branch.
  3. (Optionally, push those changes to your fork's master branch, but I always forget.)
  4. Check out a new branch to do your work on.
  5. Do your work, commit it.
  6. Push your branch to your fork, then open a pull request.

I do this on open source projects, as well as projects for work.

So what's the point of all this? Well, a master branch is a kind of "source of truth". You could say that it's good hygiene to keep your fork from having commits in it that aren't in the upstream master. You can read more about how to use branches to work on features in this really great blog post.

@richgabrielli
Copy link
Author

Thanks @ashfurrow! That makes perfect sense. I do the same on my local Xcode Swift projects with Git. I have my "master" and then I branch to a "new-dev" branch, make my additions / updates and then merge it to "master"

@richgabrielli
Copy link
Author

Last question (I promise)...

What happens when I sync masters, branch my dev repository to my local PC and make changes that take some time, merge my local to my remote master and am ready to make a PR. However, in that span the master project has had some changes. Do I need to resync or can I do a PR and you will sort it out with skill and a bit of magic? :)

@BasThomas
Copy link
Contributor

GitHub will tell you there are merge conflicts in that case, and you can either fix it on GitHub.com or locally (in the command line or any program you prefer)

Sent with GitHawk

@SD10
Copy link
Member

SD10 commented Jan 4, 2018

@richgabrielli ^ This. But sometimes you will be lucky enough to submit a PR without needing to resync if the changes don’t affect any files you worked on.

Sent with GitHawk

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants