-
Notifications
You must be signed in to change notification settings - Fork 35
/
amidst_team_modifications.html
133 lines (126 loc) · 7.79 KB
/
amidst_team_modifications.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
<!DOCTYPE html>
<html lang="en-us">
<head>
<meta content="text/html; charset=UTF-8" http-equiv="content-type">
<title>AMIDST Toolbox 2.0 by amidst</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" type="text/css" href="../stylesheets/normalize.css"
media="screen">
<link href="https://fonts.googleapis.com/css?family=Open+Sans:400,700" rel="stylesheet"
type="text/css">
<link rel="stylesheet" type="text/css" href="../stylesheets/stylesheet.css"
media="screen">
<link rel="stylesheet" type="text/css" href="../stylesheets/github-light.css"
media="screen">
</head>
<body>
<section class="page-header">
<h1 class="project-name">AMIDST Toolbox 0.4.2</h1>
<h2 class="project-tagline">A Java Toolbox for Analysis of MassIve Data
STreams using Probabilistic Graphical Models</h2>
<a href="https://github.com/amidst/toolbox" class="btn">View on GitHub</a>
<a href="https://github.com/amidst/toolbox/zipball/master" class="btn">Download
.zip</a> <a href="https://github.com/amidst/toolbox/tarball/master" class="btn">Download
.tar.gz</a> </section>
<section class="main-content">
<h1 id="basic-steps-for-contributing">Basic steps for contributing</h1>
<p>Here we will explain the basic github commands for modifying the AMIDST source code and for uploading such changes to the server. Alternatively, you can watch this <a href="https://www.youtube.com/watch?v=HegfZZyQ8u4">video-tutorial</a>. The general scheme to follow for contributing to the AMIDST source code is shown below:</p>
<div class="figure" style="text-align:center">
<img src="img/scheme_contributing.png" alt="Scheme for contributing to AMIDST toolbox." width="453" />
<p class="caption" style="text-align:center">Scheme for contributing to AMIDST toolbox.<span data-label="fig:scheme_contributing"></span></p>
</div>
<p>Now we will explain each of these steps and the involved commands.</p>
<h2 id="clone-the-repository">Clone the repository</h2>
<p>First, you can download the source code from github using the following command:</p>
<pre><code>$ git clone https://github.com/amidst/toolbox.git </code></pre>
<p>Once the download has finished, enter into the downloaded folder:</p>
<pre><code>$ cd toolbox </code></pre>
<h2 id="create-a-new-branch-from-develop">Create a new branch from develop </h2>
<p>All the new development will be done in the branch develop. <strong>Do not modify the master branch</strong> because it should always contain the source of the very last release. Thus we change into the develop branch with the following command:</p>
<pre><code>$ git checkout develop </code></pre>
<p>The terminal replies with the following output:</p>
<pre><code>Checking out files: 100% (469/469), done.
Branch develop set up to track remote branch develop from origin.
Switched to a new branch 'develop'</code></pre>
<p>To avoid overlapping, we advise you to perform all your developments or changes in a new branch created from develop. The name of this new branch will be newfeature and it can be created with the following command</p>
<pre><code>$ git branch newfeature </code></pre>
<p>We move into the recently created branch:</p>
<pre><code>$ git checkout newfeature </code></pre>
<pre><code>Switched to branch 'newfeature'</code></pre>
<p>At any moment, we can verify which is the current branch with the command show below. Make sure that your current branch is always the one you have created.</p>
<pre><code>$ git branch</code></pre>
<p>Previous command shows a list with all the local branches, being the current branch the one with the symbol *, for example:</p>
<pre><code>develop
master
* newfeature</code></pre>
<p>The new branch is not yet a remote branch. For uploading it to the server, we will use the following command:</p>
<pre><code>$ git push --set-upstream origin newfeature</code></pre>
<pre><code>Total 0 (delta 0), reused 0 (delta 0)
To https://github.com/amidst/toolbox.git
* [new branch] newfeature -> newfeature
Branch newfeature set up to track remote branch newfeature from origin.</code></pre>
<h2 id="modify-the-code-and-upload-your-changes">Modify the code and upload your changes </h2>
<p>As an example, we will simply create a new text file and upload it to the server. For creating such file run:</p>
<pre><code>$ echo "file to be deleted" > newfile.txt</code></pre>
<p>Now, we have to set the new file as a tracked file, for that purpose:</p>
<pre><code>$ git add newfile.txt </code></pre>
<p>Which generates the output shown below indicating which of the tracked files contain changes to be committed</p>
<pre><code>$ git status</code></pre>
<p>that generates the following output:</p>
<pre><code>On branch newfeature
Your branch is up-to-date with 'origin/newfeature'.
Changes to be committed:
(use "git reset HEAD <file>..." to unstage)
new file: newfile.txt
Untracked files:
(use "git add <file>..." to include in what will be committed)
...</code></pre>
<p>Now we will do a commit including the message “added newfile.txt” with the following command:<br />
</p>
<pre><code>$ git commit -m "added newfile.txt"</code></pre>
<pre><code>[newfeature f256d1e] added newfile.txt
1 file changed, 1 insertion(+)
create mode 100644 newfile.txt</code></pre>
<p>Finally, we have upload all the changes to the server:<br />
</p>
<pre><code>$ git push</code></pre>
<h2 id="merge-the-new-branch-with-develop">Merge the new branch with develop </h2>
<p>Until now, the changes done are only present in the branch newfeature. However, we should integrate these changes with the develop branch. Thus, we first change to the branch develop:<br />
</p>
<pre><code>$ git checkout develop</code></pre>
<p>Now, we will merge both branches:<br />
</p>
<pre><code>$ git merge newfeature</code></pre>
<p>If there is not conflicts, an output similar to the following one will be generated:<br />
</p>
<pre><code>Updating 20ff914..f256d1e
Fast-forward
newfile.txt | 1 +
1 file changed, 1 insertion(+)
create mode 100644 newfile.txt</code></pre>
<p>Finally, we will upload the result of merging both branches to the server:<br />
</p>
<pre><code>$ git push</code></pre>
<p>Now, if we go to the AMIDST github website (<a href="https://github.com/amidst/toolbox" class="uri">https://github.com/amidst/toolbox</a>), we can verify that the branch develop contains the changes in the code:</p>
<div class="figure" style="text-align:center">
<img src="img/merge_result.png" alt="View of the result of the contribution in the github website." width="377" />
<p class="caption" style="text-align:center">View of the result of the contribution in the github website.<span data-label="fig:merge_result"></span></p>
</div>
<footer class="site-footer"> <span class="site-footer-owner"><a href="https://github.com/amidst/toolbox">AMIDST
Toolbox 0.4.2</a> is maintained by <a href="https://github.com/amidst">amidst</a>.</span>
<span class="site-footer-credits">This page was generated by <a href="https://pages.github.com">GitHub
Pages</a> using the <a href="https://github.com/jasonlong/cayman-theme">Cayman
theme</a> by <a href="https://twitter.com/jasonlong">Jason Long</a>.</span>
</footer>
</section>
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("UA-66233470-1");
pageTracker._trackPageview();
} catch(err) {}
</script>
</body></html>