Go to your GitHub account, open the forked repository, click on the code button and then click the “copy to clipboard” icon if you intend to use a command-line tool.
Open the terminal and run the following git command:
1git clone “URL you copied from the clipboard.”
Add 'upstream' repo to list of remotes
Keeping your fork up to date while this isn't a necessary step. If you plan on doing anything more than a tiny quick fix, you'll want to make sure you keep your fork up to date by tracking the original "upstream" repo that you forked earlier.
To do this, you'll need to add a remote. An example of the command is given below:
Whenever you begin to work on a new feature or bugfix, it's important that you create a new branch. Not only is it a proper git workflow, but it also keeps your changes organized and separated from the master branch so that you can easily submit and manage multiple pull requests for every task completed.
Perform the flow:
1 git checkout -b your-new-branch-name
For example,
1git checkout -b feature
(feature being a branch name)
Make the necessary changes to your file.
To add the changes you have made to your branch, use:
1git add <file>
If you add multiple file changes to the branch, you simply use:
To contribute to this project, you must agree to the Developer Certificate of Origin (DCO) for each commit you make. The DCO is a simple statement that you, as a contributor, have the legal right to contribute.
To signify that you agree to the DCO for contributions, you simply add a line to each of your git commit messages:
1Signed-off-by: Jane Smith <jane.smith@example.com>
In most cases, you can add this signoff to your commit automatically with the -s or --signoff flag to git commit. You must use your real name and a reachable email address (sorry, no pseudonyms or anonymous contributions). An example of signing off on a commit:
1$ commit -s -m “my commit message w/signoff”
To ensure all your commits are signed, you may choose to add this alias to your global .gitconfig:
An empowerer of engineers, Layer5 helps you extract more value from your infrastructure. Creator and maintainer of service mesh standards. Maker of Meshery, the cloud native management plane.