QA/Execution/Web Testing/Automation/github: Difference between revisions
No edit summary |
No edit summary |
||
Line 24: | Line 24: | ||
If your project has files that have sensitive information, like user-names & passwords then this is how you avoid committing those files to GitHub repository: | If your project has files that have sensitive information, like user-names & passwords then this is how you avoid committing those files to GitHub repository: | ||
1. In your tests folder path:<br> git add *.py<br> This will add all .py files to staging are (including the sensitive file)<br> | 1. In your tests folder path:<br> git add *.py<br> This will add all .py files to staging are (including the sensitive file)<br> | ||
2. git rm --cached sensitive_file_name<br> This command will prevent the file from being committed but leave the file on your local disk<br> | |||
Alternatively, just add the files that have changed so that you don't do a blanket commit and commit things that should be in a separate commit. <br> |
Revision as of 18:20, 28 April 2011
If you are working with a Fork of one of repositories, please follow the steps below as it makes processing GitHub Pull Requests easier.
- git branch some-new-test
- git add test_that_breaks_the_world.py
- git commit -m 'You need this amazing-ness'
- git push origin some-new-test
Then do the Github pull request as you have already.
Then once the pull request has been completed do
- git merge some-new-test
This merges in your changes to your local master
When done and you want to delete the remote branch do
- git push origin :some-new-test
That deletes the remote copy in your Github.
If your project has files that have sensitive information, like user-names & passwords then this is how you avoid committing those files to GitHub repository:
1. In your tests folder path:
git add *.py
This will add all .py files to staging are (including the sensitive file)
2. git rm --cached sensitive_file_name
This command will prevent the file from being committed but leave the file on your local disk
Alternatively, just add the files that have changed so that you don't do a blanket commit and commit things that should be in a separate commit.