Created
September 27, 2017 11:23
-
-
Save mre/64672c481f8f1232d468e3e7169f4f77 to your computer and use it in GitHub Desktop.
Make a change in a composer vendor folder and push to branch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Go into the directory of the vendor package that you changed | |
cd vendor/<owner>/<package> | |
# Create a new git repository (composer does not check out the full git repo by default. Only a sparse copy) | |
git init | |
# Create a new branch for your local changes | |
git checkout -b branchname | |
# Commit changes | |
git add . | |
git commit -m "Commit message" | |
# Add the git remote, which contains the source code | |
git remote add origin ssh://git@<repo>.git | |
# Pull changes from remote (sync) | |
git pull origin master --allow-unrelated-histories | |
# Fix merge any conflicts | |
# then push your branch | |
git push --set-upstream origin branchname | |
# You can now create a Pull Request if you want |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment