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
{alt='Development lifecycle with Git, containing Git commands add, commit, push, fetch, restore, merge and pull' .image-with-shadow width="600px"}
126
+
{
127
+
alt='Development lifecycle with Git. Four parts of Git infrastructure are represented: working tree, staging area, local repository and remote repository, and alongside this various git commands. git add is shown moving files from working tree to staging area. git commit is shown moving files from staging area to local repository. git push is shown moving files from local repository to remote repository and git fetch from remote repository to local repository. git checkout and git merge are both shown as moving files from local repository to working tree. git pull, a shortcut for git fetch followed by git checkout / merge, is shown moving files from remote repository to working tree.'
128
+
.image-with-shadow width="600px"
129
+
}
127
130
128
131
## Checking-in Changes to Our Project
129
132
@@ -306,7 +309,7 @@ Collaborating with others involves
306
309
managing these remote repositories and pushing and pulling information
{alt='Representation of Git\'s distributed version control system showing interactions between a central repository and two local repositories on developer machines, with arrows showing pushing from central repository to developer repositories, pulling from developer repositories to central repository. A self-connecting arrow on developer repository shows creating commits in local repository.' .image-with-shadow width="400px"}
310
313
311
314
<pstyle="text-align: center;">Git - distributed version control system<br> From <ahref="https://www.w3docs.com/learn-git/git-repository.html"target="_blank">W3Docs</a> (freely available)</p>
312
315
@@ -364,7 +367,7 @@ So, working on a separate branch for each feature you are adding is good for sev
364
367
365
368
Branches are commonly used as part of a feature-branch workflow, shown in the diagram below.
{alt='Git commit tree showing four branches - Main, Develop, FeatureX and FeatureY. The Main branch shows three commits corresponding to release tags v0.1, v0.2 and v0.3. The Develop branch branches off from Main branch with intermediate commits between release tags which are then merged into Main branch. Short-lived feature branches FeatureX and FeatureY branch off from Develop branch, have a small number of additional commits and are then merged back in to Develop branch.' .image-with-shadow width="800px"}
Adapted from <ahref="https://sillevl.gitbooks.io/git/content/collaboration/workflows/gitflow/"target="_blank">Git Tutorial by sillevl</a> (Creative Commons Attribution 4.0 International License)</p>
@@ -496,7 +499,7 @@ However, as we have just created this branch locally,
496
499
it still does not exist in our remote repository.
497
500
You can check that in GitHub by listing all branches.
498
501
499
-
{alt="Software project's main branch" .image-with-shadow width="600px"}
502
+
{alt="Code tab of GitHub web interface showing main branch of software project. Branch selector dropdown is shown with main (default) branch showing as currently selected and one other branch feature-std-dev showing as present." .image-with-shadow width="600px"}
500
503
501
504
To push a new local branch remotely for the first time,
502
505
you could use the `-u` flag and the name of the branch you are creating and pushing to:
@@ -526,7 +529,7 @@ From the `Code` tab in your repository in GitHub,
526
529
click the branch dropdown menu (currently showing the default branch `main`).
527
530
You should see your `develop` branch in the list too.
{alt="Code tab of GitHub web interface showing notification indicating develop branch had recent pushes. Branch selector dropdown is shown with main (default) branch showing as currently selected and two other branches develop and feature-std-dev showing as present, with develop highlighted." .image-with-shadow width="600px"}
530
533
531
534
You may also have noticed GitHub's notification about the latest push to your `develop` branch just
532
535
on top of the repository files and branches drop-down menu.
0 commit comments