-
-
Save rufus2021/87f6163ecab2ba4d3d0d to your computer and use it in GitHub Desktop.
Steps for creating a new branch, adding, commiting & pushing changes & creating a new pull request | |
NOTE: don't make commits directly to the develop branch. | |
step 1: git checkout develop - checks out the develop branch locally | |
step 2: git pull - gets you the latest updates for the repo | |
step 3: git checkout -b name bugfix/yaya-codes-awesome - create a new branch based off of develop | |
you make a change in sass code | |
npm test - tests code for any syntax errors | |
if no errors -> git status - shows you the files changed | |
git add . - adds all changed files | |
git commit -m 'commit message here' | |
git push (you get a message to set upstream branch) | |
copy/paste the message and hit enter | |
go to github.com/repo and create a new pull request | |
Rebasing
When you want to merge multiple changes into one neat, little package!
git commit -m"I made some changes"
git commit -m"I made some MORE changes"
git rebase -i head~2
You will see something like:
pick 12345 I made some changes
pick 45678 I made some MORE changes
- Change "pick" to "s" (or "squash") to combine the changes into one and keep both messages.
- Change "pick" to "f" (or "fixup") to combine the changes and get rid of the fixup message (no one will ever know about your mistake!)
- Or, if you want to rewrite your message, change "pick" to "r" (or "rewrite")
Once you have rebased, you have changed history! If you are pushing to an existing branch, you will have to force-push to manually overwrite your previous work! (This can be dangerous! Only do it on purpose!)
git push -f
Branches
Creating a new branch
git checkout -b feature/some-work-to-do
Viewing Your Branches
Your current branch will be marked with an asterisk (*)
git branch
Viewing branches that have already been merged
git branch --merged
Deleting branches that have been merged (or have no changes)
git branch -d <branch name>
Deleting a branch that has not been merged
Use force! Because you're the boss
git branch -D <branch name>
note: capital -D
Changing the name of the current branch
git branch -m <new branch name>
Whenever autopilot components are updated, run command
npm install
this will update app locally.
npm i && gulp sprite && gulp build
install everything.
AD:
NODE_ENV='development' NODE_COPILOT_API='ci-ad-api.aws.conde.io' PARSELY_APIKEY="architecturaldigest.com" PARSELY_SECRET="XtQS15Iqm80BOOQz3KhVs9ehvOBKYdcJlKMFXqxBTiU" gulp develop
ulimit -n 2560
ulimit -n 1024
ulimit -u 1024
copilot
git pull --rebase
Frontend
npm i && bower i
start server
ember server
Backend
another tab: cd express
-> copilot/express
npm i
start server
NODE_ENV=remoteauth npm start
Visit: copilot-local.aws.conde.io:4200
Copilot Theme
- ywang5 ~/Developer/copilot-theme
npm link
- ywang5 ~/Developer/copilot
npm link @condenast/copilot-theme
- Uncomment that part in copilot-theme/index.js
scss-lint folder/file
nvm ls
nvm use v4.4.1
Merging others' branch
git pull origin [branch]
Abandon code
git checkout -- ./
in root directory
git checkout .
on the branch
npm run dev