You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: laravel/documentation/contrib/command-line.md
+25-24Lines changed: 25 additions & 24 deletions
Original file line number
Diff line number
Diff line change
@@ -1,28 +1,29 @@
1
1
# Contributing to Laravel via Command-Line
2
2
3
3
## Contents
4
-
-[Getting Started](#getting-started)
5
-
-[Forking Laravel](#forking-laravel)
6
-
-[Cloning Laravel](#cloning-laravel)
7
-
-[Adding your Fork](#adding-your-fork)
8
-
-[Creating Branches](#creating-branches)
9
-
-[Committing](#committing)
10
-
-[Submitting a Pull Request](#submitting-a-pull-request)
11
-
-[What's Next?](#whats-next)
12
-
13
-
<aname='getting-started'></a>
4
+
5
+
-[Getting Started](#getting-started)
6
+
-[Forking Laravel](#forking-laravel)
7
+
-[Cloning Laravel](#cloning-laravel)
8
+
-[Adding your Fork](#adding-your-fork)
9
+
-[Creating Branches](#creating-branches)
10
+
-[Committing](#committing)
11
+
-[Submitting a Pull Request](#submitting-a-pull-request)
12
+
-[What's Next?](#whats-next)
13
+
14
+
<aname="getting-started"></a>
14
15
## Getting Started
15
16
16
17
This tutorial explains the basics of contributing to a project on [GitHub](https://github.com/) via the command-line. The workflow can apply to most projects on GitHub, but in this case, we will be focused on the [Laravel](https://github.com/laravel/laravel) project. This tutorial is applicable to OSX, Linux and Windows.
17
18
18
19
This tutorial assumes you have installed [Git](http://git-scm.com/) and you have created a [GitHub account](https://github.com/signup/free). If you haven't already, look at the [Laravel on GitHub](/docs/contrib/github) documentation in order to familiarize yourself with Laravel's repositories and branches.
19
20
20
-
<aname='forking-laravel'></a>
21
+
<aname="forking-laravel"></a>
21
22
## Forking Laravel
22
23
23
24
Login to GitHub and visit the [Laravel Repository](https://github.com/laravel/laravel). Click on the **Fork** button. This will create your own fork of Laravel in your own GitHub account. Your Laravel fork will be located at **https://github.com/username/laravel** (your GitHub username will be used in place of *username*).
24
25
25
-
<aname='cloning-laravel'></a>
26
+
<aname="cloning-laravel"></a>
26
27
## Cloning Laravel
27
28
28
29
Open up the command-line or terminal and make a new directory where you can make development changes to Laravel:
@@ -36,7 +37,7 @@ Next, clone the Laravel repository (not your fork you made):
36
37
37
38
> **Note**: The reason you are cloning the o
EDBE
riginal Laravel repository (and not the fork you made) is so you can always pull down the most recent changes from the Laravel repository to your local repository.
38
39
39
-
<aname='adding-your-fork'></a>
40
+
<aname="adding-your-fork"></a>
40
41
## Adding your Fork
41
42
42
43
Next, it's time to add the fork you made as a **remote repository**:
@@ -49,7 +50,7 @@ Remember to replace *username** with your GitHub username. *This is case-sensiti
49
50
50
51
Now you have a pristine clone of the Laravel repository along with your fork as a remote repository. You are ready to begin branching for new features or fixing bugs.
51
52
52
-
<aname='creating-branches'></a>
53
+
<aname="creating-branches"></a>
53
54
## Creating Branches
54
55
55
56
First, make sure you are working in the **develop** branch. If you submit changes to the **master** branch, it is unlikely they will be pulled in anytime in the near future. For more information on this, read the documentation for [Laravel on GitHub](/docs/contrib/github). To switch to the develop branch:
@@ -76,7 +77,7 @@ Or if there is a new feature to add or change to the documentation that you want
76
77
77
78
Now that you have created your own branch and have switched to it, it's time to make your changes to the code. Add your new feature or fix that bug.
78
79
79
-
<aname='committing'></a>
80
+
<aname="committing"></a>
80
81
## Committing
81
82
82
83
Now that you have finished coding and testing your changes, it's time to commit them to your local repository. First, add the files that you changed/added:
@@ -87,10 +88,10 @@ Next, commit the changes to the repository:
87
88
88
89
# git commit -s -m "I added some more stuff to the Localization documentation."
89
90
90
-
-**-s** means that you are signing-off on your commit with your name. This tells the Laravel team know that you personally agree to your code being added to the Laravel core.
91
-
-**-m** is the message that goes with your commit. Provide a brief explanation of what you added or changed.
91
+
"- **-s** means that you are signing-off on your commit with your name. This tells the Laravel team know that you personally agree to your code being added to the Laravel core.
92
+
"- **-m** is the message that goes with your commit. Provide a brief explanation of what you added or changed.
92
93
93
-
<aname='pushing-to-your-fork'></a>
94
+
<aname="pushing-to-your-fork"></a>
94
95
## Pushing to your Fork
95
96
96
97
Now that your local repository has your committed changes, it's time to push (or sync) your new branch to your fork that is hosted in GitHub:
@@ -99,19 +100,19 @@ Now that your local repository has your committed changes, it's time to push (or
99
100
100
101
Your branch has been successfully pushed to your fork on GitHub.
101
102
102
-
<aname='submitting-a-pull-request'></a>
103
+
<aname="submitting-a-pull-request"></a>
103
104
## Submitting a Pull Request
104
105
105
106
The final step is to submit a pull request to the Laravel repository. This means that you are requesting that the Laravel team pull and merge your changes to the Laravel core. In your browser, visit your Laravel fork at [https://github.com/username/laravel](https://github.com/username/laravel). Click on **Pull Request**. Next, make sure you choose the proper base and head repositories and branches:
106
107
107
-
-**base repo:** laravel/laravel
108
-
-**base branch:** develop
109
-
-**head repo:** username/laravel
110
-
-**head branch:** feature/localization-docs
108
+
-**base repo:** laravel/laravel
109
+
-**base branch:** develop
110
+
-**head repo:** username/laravel
111
+
-**head branch:** feature/localization-docs
111
112
112
113
Use the form to write a more detailed description of the changes you made and why you made them. Finally, click **Send pull request**. That's it! The changes you made have been submitted to the Laravel team.
113
114
114
-
<aname='whats-next'></a>
115
+
<aname="whats-next"></a>
115
116
## What's Next?
116
117
117
118
Do you have another feature you want to add or another bug you need to fix? First, make sure you always base your new branch off of the develop branch:
-[Submitting a Pull Request](#submitting-a-pull-request)
11
-
-[What's Next?](#whats-next)
12
-
13
-
<aname='getting-started'></a>
4
+
5
+
-[Getting Started](#getting-started)
6
+
-[Forking Laravel](#forking-laravel)
7
+
-[Cloning Laravel](#cloning-laravel)
8
+
-[Adding your Fork](#adding-your-fork)
9
+
-[Creating Branches](#creating-branches)
10
+
-[Committing](#committing)
11
+
-[Submitting a Pull Request](#submitting-a-pull-request)
12
+
-[What's Next?](#whats-next)
13
+
14
+
<aname="getting-started"></a>
14
15
## Getting Started
15
16
16
17
This tutorial explains the basics of contributing to a project on [GitHub](https://github.com/) using [TortoiseGit](http://code.google.com/p/tortoisegit/) for Windows. The workflow can apply to most projects on GitHub, but in this case, we will be focused on the [Laravel](https://github.com/laravel/laravel) project.
17
18
18
19
This tutorial assumes you have installed TortoiseGit for Windows and you have created a GitHub account. If you haven't already, look at the [Laravel on GitHub](/docs/contrib/github) documentation in order to familiarize yourself with Laravel's repositories and branches.
19
20
20
-
<aname='forking-laravel'></a>
21
+
<aname="forking-laravel"></a>
21
22
## Forking Laravel
22
23
23
24
Login to GitHub and visit the [Laravel Repository](https://github.com/laravel/laravel). Click on the **Fork** button. This will create your own fork of Laravel in your own GitHub account. Your Laravel fork will be located at **https://github.com/username/laravel** (your GitHub username will be used in place of *username*).
24
25
25
-
<aname='cloning-laravel'></a>
26
+
<aname="cloning-laravel"></a>
26
27
## Cloning Laravel
27
28
28
29
Open up Windows Explorer and create a new directory where you can make development changes to Laravel.
29
30
30
-
- Right-click the Laravel directory to bring up the context menu. Click on **Git Clone...**
31
-
- Git clone
31
+
- Right-click the Laravel directory to bring up the context menu. Click on **Git Clone...**
32
+
- Git clone
32
33
-**Url:**https://github.com/laravel/laravel.git
33
34
-**Directory:** the directory that you just created in the previous step
34
35
- Click **OK**
35
36
36
37
> **Note**: The reason you are cloning the original Laravel repository (and not the fork you made) is so you can always pull down the most recent changes from the Laravel repository to your local repository.
37
38
38
-
<aname='adding-your-fork'></a>
39
+
<aname="adding-your-fork"></a>
39
40
## Adding your Fork
40
41
41
42
After the cloning process is complete, it's time to add the fork you made as a **remote repository**.
42
43
43
-
- Right-click the Laravel directory and goto **TortoiseGit > Settings**
44
-
- Goto the **Git/Remote** section. Add a new remote:
44
+
- Right-click the Laravel directory and goto **TortoiseGit > Settings**
45
+
- Goto the **Git/Remote** section. Add a new remote:
45
46
-**Remote**: fork
46
47
-**URL**: https://github.com/username/laravel.git
47
48
- Click **Add New/Save**
48
49
- Click **OK**
49
50
50
51
Remember to replace *username* with your GitHub username. *This is case-sensitive*.
51
52
52
-
<aname='creating-branches'></a>
53
+
<aname="creating-branches"></a>
53
54
## Creating Branches
54
55
55
56
Now you are ready to create a new branch for your new feature or bug-fix. When you create a new branch, use a self-descriptive naming convention. For example, if you are going to fix a bug in Eloquent, name your branch *bug/eloquent*. Or if you were going to make changes to the localization documentation, name your branch *feature/localization-docs*. A good naming convention will encourage organization and help others understand the purpose of your branch.
56
57
57
-
- Right-click the Laravel directory and goto **TortoiseGit > Create Branch**
58
+
- Right-click the Laravel directory and goto **TortoiseGit > Create Branch**
58
59
-**Branch:** feature/localization-docs
59
60
-**Base On Branch:** remotes/origin/develop
60
61
-**Check***Track*
@@ -67,47 +68,47 @@ This will create your new *feature/localization-docs* branch and switch you to i
67
68
68
69
Now that you have created your own branch and have switched to it, it's time to make your changes to the code. Add your new feature or fix that bug.
69
70
70
-
<aname='committing'></a>
71
+
<aname="committing"></a>
71
72
##Committing
72
73
73
74
Now that you have finished coding and testing your changes, it's time to commit them to your local repository:
74
75
75
-
- Right-click the Laravel directory and goto **Git Commit -> "feature/localization-docs"...**
76
-
- Commit
76
+
- Right-click the Laravel directory and goto **Git Commit -> "feature/localization-docs"...**
77
+
- Commit
77
78
-**Message:** Provide a brief explaination of what you added or changed
78
79
- Click **Sign** - This tells the Laravel team know that you personally agree to your code being added to the Laravel core
79
80
-**Changes made:** Check all changed/added files
80
81
- Click **OK**
81
82
82
-
<aname='pushing-to-your-fork'></a>
83
+
<aname="pushing-to-your-fork"></a>
83
84
## Pushing to your Fork
84
85
85
86
Now that your local repository has your committed changes, it's time to push (or sync) your new branch to your fork that is hosted in GitHub:
86
87
87
88
- Right-click the Laravel directory and goto **Git Sync...**
88
89
- Git Syncronization
89
-
-**Local Branch:** feature/localization-docs
90
-
-**Remote Branch:** leave this blank
91
-
-**Remote URL:** fork
92
-
- Click **Push**
93
-
- When asked for "username:" enter your GitHub *case-sensitive* username
94
-
- When asked for "password:" enter your GitHub *case-sensitive* account
90
+
-**Local Branch:** feature/localization-docs
91
+
-**Remote Branch:** leave this blank
92
+
-**Remote URL:** fork
93
+
- Click **Push**
94
+
- When asked for "username:" enter your GitHub *case-sensitive* username
95
+
- When asked for "password:" enter your GitHub *case-sensitive* account
95
96
96
97
Your branch has been successfully pushed to your fork on GitHub.
97
98
98
-
<aname='submitting-a-pull-request'></a>
99
+
<aname="submitting-a-pull-request"></a>
99
100
## Submitting a Pull Request
100
101
101
102
The final step is to submit a pull request to the Laravel repository. This means that you are requesting that the Laravel team pull and merge your changes to the Laravel core. In your browser, visit your Laravel fork at [https://github.com/username/laravel](https://github.com/username/laravel). Click on **Pull Request**. Next, make sure you choose the proper base and head repositories and branches:
102
103
103
-
-**base repo:** laravel/laravel
104
-
-**base branch:** develop
105
-
-**head repo:** username/laravel
106
-
-**head branch:** feature/localization-docs
104
+
-**base repo:** laravel/laravel
105
+
-**base branch:** develop
106
+
-**head repo:** username/laravel
107
+
-**head branch:** feature/localization-docs
107
108
108
109
Use the form to write a more detailed description of the changes you made and why you made them. Finally, click **Send pull request**. That's it! The changes you made have been submitted to the Laravel team.
109
110
110
-
<aname='whats-next'></a>
111
+
<aname="whats-next"></a>
111
112
## What's Next?
112
113
113
114
Do you have another feature you want to add or another bug you need to fix? Just follow the same instructions as before in the [Creating Branches](#creating-branches) section. Just remember to always create a new branch for every new feature/fix and don't forget to always base your new branches off of the *remotes/origin/develop* branch.
0 commit comments