Github work flow
- Create folder “Cypress-Git-Workflow” on desktop
- Open VSCode and new terminal
- Initial Git local repo
> git init
4. Create file “.gitignore” then type ignore file
5. Add all file to local repo
>git add .
>git commit -m "create .gitignore"
6. Go to Github site, then create new repo for it.
7. Click on “Create respository” button then shown below , You can now copy command in section “…or push an existing repository from the command line”. then pass to VSCode project
Below pass command to VScode for push local repo to Main repo ( You may need to edit Main to “Master” branch in this step. )
8. Switch back to Github site and check the repo that just push file is update correctly.
9. Create new branch for new test or new feature by Go to VSCode and click on Main/Master branch
I type dev and enter then show dev branch like this
Create new file for dev branch
Update dev branch by click on source control and type comment
then command+Enter to commit file ( but not push to Github )
now we need to push to Github by click on … then click on push
switch to github site , you will found below section. then click on compare & pull request.
Then Type Subject for pull request then cllick on “Create Pull request”
New file ready to merge to main/master branch by click on “Merge pull request” below
After merge to main/master branch you will check master branch and found new file as below.
When you want to create another job on this project you must pull lastest code from master to VScode first ( see step below )
then fetch latest code from github site to local repo
After that you will need to create new branch before work like step 9. again.