-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
1530 lines (1379 loc) · 57 KB
/
index.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
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html>
<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
<!--[if gt IE 8]><!-->
<html class="no-js" lang="en">
<!--<![endif]-->
<!-- editor/versioncontrol/ Sat, 30 Oct 2021 04:57:11 -->
<!-- Added by HTTrack --><meta
http-equiv="content-type"
content="text/html;charset=utf-8"
/><!-- /Added by HTTrack -->
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Versioncontrol - vscode</title>
<link rel="shortcut icon" href="../../img/favicon.ico" />
<link
href="https://fonts.googleapis.com/css?family=Lato:400,700|Roboto+Slab:400,700|Inconsolata:400,700"
rel="stylesheet"
type="text/css"
/>
<link rel="stylesheet" href="../../css/theme.css" type="text/css" />
<link rel="stylesheet" href="../../css/theme_extra.css" type="text/css" />
<link rel="stylesheet" href="../../css/highlight.css" />
<link
href="../../../../../assets.readthedocs.org/static/css/badge_only.css"
rel="stylesheet"
/>
<link
href="../../../../../assets.readthedocs.org/static/css/readthedocs-doc-embed.css"
rel="stylesheet"
/>
<script>
// Current page data
var mkdocs_page_name = "Versioncontrol";
var mkdocs_page_input_path = "editor/versioncontrol.md";
var mkdocs_page_url =
"https://vscode.readthedocs.io/editor/versioncontrol/";
</script>
<script src="../../js/jquery-2.1.1.min.js"></script>
<script src="../../js/modernizr-2.8.3.min.js"></script>
<script type="text/javascript" src="../../js/highlight.pack.js"></script>
<script src="../../js/theme.js"></script>
<script src="../../readthedocs-data.js"></script>
<script src="../../readthedocs-dynamic-include.js"></script>
<script src="../../../../../assets.readthedocs.org/static/static/core/js/readthedocs-doc-embed.js"></script>
</head>
<body class="wy-body-for-nav" role="document">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side stickynav">
<div class="wy-side-nav-search">
<a href="../../index.html" class="icon icon-home"> vscode</a>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="#" method="get">
<input type="text" name="q" placeholder="Search docs" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div>
<div
class="wy-menu wy-menu-vertical"
data-spy="affix"
role="navigation"
aria-label="main navigation"
>
<ul class="current">
<li></li>
<li class="toctree-l1">
<a class="" href="../../index.html">Home</a>
</li>
<li></li>
<li>
<ul class="subnav">
<li><span>Customization</span></li>
<li class="toctree-l1">
<a
class=""
href="../../customization/keyboard-shortcuts/index.html"
>Keyboard shortcuts</a
>
</li>
</ul>
</li>
<li></li>
<li>
<ul class="subnav">
<li><span>Editor</span></li>
<li class="toctree-l1">
<a class="" href="../accessibility/index.html"
>Accessibility</a
>
</li>
<li class="toctree-l1">
<a class="" href="../codebasics/index.html">Codebasics</a>
</li>
<li class="toctree-l1">
<a class="" href="../command-line/index.html">Command line</a>
</li>
<li class="toctree-l1">
<a class="" href="../debugging/index.html">Debugging</a>
</li>
<li class="toctree-l1">
<a class="" href="../editingevolved/index.html"
>Editingevolved</a
>
</li>
<li class="toctree-l1">
<a class="" href="../emmet/index.html">Emmet</a>
</li>
<li class="toctree-l1">
<a class="" href="../extension-gallery/index.html"
>Extension gallery</a
>
</li>
<li class="toctree-l1">
<a class="" href="../integrated-terminal/index.html"
>Integrated terminal</a
>
</li>
<li class="toctree-l1">
<a class="" href="../intellisense/index.html">Intellisense</a>
</li>
<li class="toctree-l1">
<a class="" href="../tasks-appendix/index.html"
>Tasks appendix</a
>
</li>
<li class="toctree-l1">
<a class="" href="../tasks-v1-appendix/index.html"
>Tasks v1 appendix</a
>
</li>
<li class="toctree-l1">
<a class="" href="../tasks-v1/index.html">Tasks v1</a>
</li>
<li class="toctree-l1">
<a class="" href="../tasks/index.html">Tasks</a>
</li>
<li class="toctree-l1">
<a class="" href="../userdefinedsnippets/index.html"
>Userdefinedsnippets</a
>
</li>
<li class="toctree-l1 current">
<a class="current" href="index.html">Versioncontrol</a>
<ul>
<li class="toctree-l3">
<a href="#using-version-control-in-vs-code"
>Using Version Control in VS Code</a
>
</li>
<li>
<a class="toctree-l4" href="#switch-scm-providers"
>Switch SCM Providers</a
>
</li>
<li>
<a class="toctree-l4" href="#git-support">Git support</a>
</li>
<li>
<a class="toctree-l4" href="#git-status-bar-actions"
>Git Status Bar Actions</a
>
</li>
<li><a class="toctree-l4" href="#commit">Commit</a></li>
<li>
<a class="toctree-l4" href="#cloning-a-repository"
>Cloning a repository</a
>
</li>
<li>
<a class="toctree-l4" href="#branches-and-tags"
>Branches and Tags</a
>
</li>
<li><a class="toctree-l4" href="#remotes">Remotes</a></li>
<li>
<a class="toctree-l4" href="#gutter-indicators"
>Gutter indicators</a
>
</li>
<li>
<a class="toctree-l4" href="#merge-conflicts"
>Merge Conflicts</a
>
</li>
<li>
<a class="toctree-l4" href="#viewing-diffs"
>Viewing Diffs</a
>
</li>
<li>
<a class="toctree-l4" href="#git-output-window"
>Git Output Window</a
>
</li>
<li>
<a class="toctree-l4" href="#initialize-a-repository"
>Initialize a Repository</a
>
</li>
<li>
<a class="toctree-l4" href="#git-patchdiff-mode"
>Git patch/diff mode</a
>
</li>
<li>
<a class="toctree-l4" href="#next-steps">Next Steps</a>
</li>
<li>
<a class="toctree-l4" href="#common-questions"
>Common Questions</a
>
</li>
</ul>
</li>
<li class="toctree-l1">
<a class="" href="../whyvscode/index.html">Whyvscode</a>
</li>
</ul>
</li>
<li></li>
<li>
<ul class="subnav">
<li><span>extensionAPI</span></li>
<li class="toctree-l1">
<a
class=""
href="../../extensionAPI/activation-events/index.html"
>Activation events</a
>
</li>
<li class="toctree-l1">
<a class="" href="../../extensionAPI/api-debugging/index.html"
>Api debugging</a
>
</li>
<li class="toctree-l1">
<a class="" href="../../extensionAPI/api-markdown/index.html"
>Api markdown</a
>
</li>
<li class="toctree-l1">
<a class="" href="../../extensionAPI/api-scm/index.html"
>Api scm</a
>
</li>
<li class="toctree-l1">
<a
class=""
href="../../extensionAPI/extension-manifest/index.html"
>Extension manifest</a
>
</li>
<li class="toctree-l1">
<a
class=""
href="../../extensionAPI/extension-points/index.html"
>Extension points</a
>
</li>
<li class="toctree-l1">
<a
class=""
href="../../extensionAPI/language-support/index.html"
>Language support</a
>
</li>
<li class="toctree-l1">
<a class="" href="../../extensionAPI/overview/index.html"
>Overview</a
>
</li>
<li class="toctree-l1">
<a
class=""
href="../../extensionAPI/patterns-and-principles/index.html"
>Patterns and principles</a
>
</li>
<li class="toctree-l1">
<a
class=""
href="../../extensionAPI/vscode-api-commands/index.html"
>Vscode api commands</a
>
</li>
<li class="toctree-l1">
<a class="" href="../../extensionAPI/vscode-api/index.html"
>Vscode api</a
>
</li>
</ul>
</li>
<li></li>
<li>
<ul class="subnav">
<li><span>Extensions</span></li>
<li class="toctree-l1">
<a
class=""
href="../../extensions/debugging-extensions/index.html"
>Debugging extensions</a
>
</li>
<li class="toctree-l1">
<a
class=""
href="../../extensions/example-debuggers/index.html"
>Example debuggers</a
>
</li>
<li class="toctree-l1">
<a
class=""
href="../../extensions/example-hello-world/index.html"
>Example hello world</a
>
</li>
<li class="toctree-l1">
<a
class=""
href="../../extensions/example-language-server/index.html"
>Example language server</a
>
</li>
<li class="toctree-l1">
<a
class=""
href="../../extensions/example-word-count/index.html"
>Example word count</a
>
</li>
<li class="toctree-l1">
<a class="" href="../../extensions/overview/index.html"
>Overview</a
>
</li>
<li class="toctree-l1">
<a
class=""
href="../../extensions/publish-extension/index.html"
>Publish extension</a
>
</li>
<li class="toctree-l1">
<a class="" href="../../extensions/samples/index.html"
>Samples</a
>
</li>
<li class="toctree-l1">
<a
class=""
href="../../extensions/testing-extensions/index.html"
>Testing extensions</a
>
</li>
<li class="toctree-l1">
<a
class=""
href="../../extensions/themes-snippets-colorizers/index.html"
>Themes snippets colorizers</a
>
</li>
<li class="toctree-l1">
<a class="" href="../../extensions/yocode/index.html"
>Yocode</a
>
</li>
</ul>
</li>
<li></li>
<li>
<ul class="subnav">
<li><span>Getstarted</span></li>
<li class="toctree-l1">
<a class="" href="../../getstarted/introvideos/index.html"
>Introvideos</a
>
</li>
<li class="toctree-l1">
<a class="" href="../../getstarted/keybindings/index.html"
>Keybindings</a
>
</li>
<li class="toctree-l1">
<a class="" href="../../getstarted/locales/index.html"
>Locales</a
>
</li>
<li class="toctree-l1">
<a class="" href="../../getstarted/settings/index.html"
>Settings</a
>
</li>
<li class="toctree-l1">
<a
class=""
href="../../getstarted/theme-color-reference/index.html"
>Theme color reference</a
>
</li>
<li class="toctree-l1">
<a class="" href="../../getstarted/themes/index.html"
>Themes</a
>
</li>
<li class="toctree-l1">
<a class="" href="../../getstarted/userinterface/index.html"
>Userinterface</a
>
</li>
</ul>
</li>
<li></li>
<li>
<ul class="subnav">
<li><span>Introvideos</span></li>
<li class="toctree-l1">
<a class="" href="../../introvideos/basics/index.html"
>Basics</a
>
</li>
<li class="toctree-l1">
<a class="" href="../../introvideos/codeediting/index.html"
>Codeediting</a
>
</li>
<li class="toctree-l1">
<a class="" href="../../introvideos/configure/index.html"
>Configure</a
>
</li>
<li class="toctree-l1">
<a class="" href="../../introvideos/debugging/index.html"
>Debugging</a
>
</li>
<li class="toctree-l1">
<a class="" href="../../introvideos/extend/index.html"
>Extend</a
>
</li>
<li class="toctree-l1">
<a class="" href="../../introvideos/intellisense/index.html"
>Intellisense</a
>
</li>
<li class="toctree-l1">
<a class="" href="../../introvideos/quicktour/index.html"
>Quicktour</a
>
</li>
<li class="toctree-l1">
<a class="" href="../../introvideos/versioncontrol/index.html"
>Versioncontrol</a
>
</li>
</ul>
</li>
<li></li>
<li>
<ul class="subnav">
<li><span>Languages</span></li>
<li class="toctree-l1">
<a class="" href="../../languages/cpp/index.html">Cpp</a>
</li>
<li class="toctree-l1">
<a class="" href="../../languages/csharp/index.html"
>Csharp</a
>
</li>
<li class="toctree-l1">
<a class="" href="../../languages/css/index.html">Css</a>
</li>
<li class="toctree-l1">
<a class="" href="../../languages/dockerfile/index.html"
>Dockerfile</a
>
</li>
<li class="toctree-l1">
<a class="" href="../../languages/go/index.html">Go</a>
</li>
<li class="toctree-l1">
<a class="" href="../../languages/html/index.html">Html</a>
</li>
<li class="toctree-l1">
<a class="" href="../../languages/identifiers/index.html"
>Identifiers</a
>
</li>
<li class="toctree-l1">
<a class="" href="../../languages/javascript/index.html"
>Javascript</a
>
</li>
<li class="toctree-l1">
<a class="" href="../../languages/jsconfig/index.html"
>Jsconfig</a
>
</li>
<li class="toctree-l1">
<a class="" href="../../languages/json/index.html">Json</a>
</li>
<li class="toctree-l1">
<a class="" href="../../languages/markdown/index.html"
>Markdown</a
>
</li>
<li class="toctree-l1">
<a class="" href="../../languages/overview/index.html"
>Overview</a
>
</li>
<li class="toctree-l1">
<a class="" href="../../languages/php/index.html">Php</a>
</li>
<li class="toctree-l1">
<a class="" href="../../languages/python/index.html"
>Python</a
>
</li>
<li class="toctree-l1">
<a class="" href="../../languages/tsql/index.html">Tsql</a>
</li>
<li class="toctree-l1">
<a class="" href="../../languages/typescript/index.html"
>Typescript</a
>
</li>
</ul>
</li>
<li></li>
<li>
<ul class="subnav">
<li><span>Nodejs</span></li>
<li class="toctree-l1">
<a class="" href="../../nodejs/angular-tutorial/index.html"
>Angular tutorial</a
>
</li>
<li class="toctree-l1">
<a class="" href="../../nodejs/extensions/index.html"
>Extensions</a
>
</li>
<li class="toctree-l1">
<a
class=""
href="../../nodejs/javascript-transpilers/index.html"
>Javascript transpilers</a
>
</li>
<li class="toctree-l1">
<a class="" href="../../nodejs/nodejs-debugging/index.html"
>Nodejs debugging</a
>
</li>
<li class="toctree-l1">
<a class="" href="../../nodejs/nodejs-deployment/index.html"
>Nodejs deployment</a
>
</li>
<li class="toctree-l1">
<a class="" href="../../nodejs/nodejs-tutorial/index.html"
>Nodejs tutorial</a
>
</li>
<li class="toctree-l1">
<a
class=""
href="../../nodejs/other-javascript-runtimes/index.html"
>Other javascript runtimes</a
>
</li>
<li class="toctree-l1">
<a class="" href="../../nodejs/overview/index.html"
>Overview</a
>
</li>
<li class="toctree-l1">
<a class="" href="../../nodejs/reactjs-tutorial/index.html"
>Reactjs tutorial</a
>
</li>
<li class="toctree-l1">
<a class="" href="../../nodejs/tasks/index.html">Tasks</a>
</li>
</ul>
</li>
<li></li>
<li>
<ul class="subnav">
<li><span>Other</span></li>
<li class="toctree-l1">
<a class="" href="../../other/dotnet/index.html">Dotnet</a>
</li>
<li class="toctree-l1">
<a class="" href="../../other/office/index.html">Office</a>
</li>
<li class="toctree-l1">
<a class="" href="../../other/unity/index.html">Unity</a>
</li>
</ul>
</li>
<li></li>
<li>
<ul class="subnav">
<li><span>Setup</span></li>
<li class="toctree-l1">
<a
class=""
href="../../setup/additional-components/index.html"
>Additional components</a
>
</li>
<li class="toctree-l1">
<a class="" href="../../setup/linux/index.html">Linux</a>
</li>
<li class="toctree-l1">
<a class="" href="../../setup/mac/index.html">Mac</a>
</li>
<li class="toctree-l1">
<a class="" href="../../setup/network/index.html">Network</a>
</li>
<li class="toctree-l1">
<a class="" href="../../setup/setup-overview/index.html"
>Setup overview</a
>
</li>
<li class="toctree-l1">
<a class="" href="../../setup/windows/index.html">Windows</a>
</li>
</ul>
</li>
<li></li>
<li>
<ul class="subnav">
<li><span>Supporting</span></li>
<li class="toctree-l1">
<a class="" href="../../supporting/errors/index.html"
>Errors</a
>
</li>
<li class="toctree-l1">
<a class="" href="../../supporting/faq/index.html">Faq</a>
</li>
<li class="toctree-l1">
<a class="" href="../../supporting/requirements/index.html"
>Requirements</a
>
</li>
</ul>
</li>
<li></li>
</ul>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
<nav class="wy-nav-top" role="navigation" aria-label="top navigation">
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="../../index.html">vscode</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="breadcrumbs navigation">
<ul class="wy-breadcrumbs">
<li><a href="../../index.html">Docs</a> »</li>
<li>Editor »</li>
<li>Versioncontrol</li>
<li class="wy-breadcrumbs-aside"></li>
</ul>
<hr />
</div>
<div role="main">
<div class="section">
<h1 id="using-version-control-in-vs-code">
Using Version Control in VS Code
</h1>
<p>
Visual Studio Code has integrated source control and includes
<a href="https://git-scm.com/">Git</a> support in-the-box.
Many other source control providers are available through
<a
href="https://vscode.readthedocs.io/docs/editor/extension-gallery.md"
>extensions</a
>
on the VS Code Marketplace.
</p>
<div class="marketplace-extensions-scm-curated"></div>
<blockquote>
<p>
<strong>Tip:</strong> Click on an extension tile to read the
description and reviews in the Marketplace.
</p>
</blockquote>
<h2 id="switch-scm-providers">Switch SCM Providers</h2>
<p>
By default, VS Code has the Git source control provider
enabled but you can install and switch to another SCM
provider. Click the <strong>More</strong> (...) button in the
<strong>Source Control</strong> view and you will see a
command to <strong>Switch SCM Provider...</strong>. This
brings up a list of currently installed SCM providers as well
as a shortcut to
<strong>Install Additional SCM Providers...</strong> from the
<strong>Extensions</strong> view.
</p>
<p>
<img
alt="switch SCM providers"
src="../images/versioncontrol/switch-scm-providers.png"
/>
</p>
<h2 id="git-support">Git support</h2>
<p>
VS Code ships with a Git source control manager (SCM)
extension. Most of the source control UI and work flows are
common across other SCM extensions so reading about the Git
support will help you understand how to use another provider.
</p>
<blockquote>
<p>
<strong>Note:</strong> If you are new to Git, the
<a href="https://git-scm.com/documentation">git-scm</a>
website is a good place to start with a popular online
<a href="https://git-scm.com/book">book</a>, Getting Started
<a href="https://git-scm.com/video/what-is-git">videos</a>
and
<a
href="https://services.github.com/on-demand/downloads/github-git-cheat-sheet.pdf"
>cheat sheets</a
>. The VS Code documentation assumes you are already
familiar with Git.
</p>
</blockquote>
<p>
<img
alt="git overview"
src="../images/versioncontrol/overview.png"
/>
</p>
<blockquote>
<p>
<strong>Note:</strong> VS Code will leverage your machine's
Git installation, so you need to
<a href="https://git-scm.com/download">install Git</a> first
before you get these features. Make sure you install at
least version <code>2.0.0</code>.
</p>
<p>
<strong>Tip:</strong> VS Code will work with any Git
repository. If you don't already have a private hosted Git
provider,
<a
href="https://www.visualstudio.com/products/visual-studio-team-services-vs"
>Visual Studio Team Services</a
>
is a great free option.
<a
href="https://go.microsoft.com/fwlink/?LinkID=307137&campaign=o~msft~code~vc"
>Click here to sign-up</a
>.
</p>
</blockquote>
<p>
The Source Control icon on the left will always indicate an
<strong>overview of how many changes</strong> you currently
have in your repository. Clicking it will show you the details
of your current repository changes: <strong>CHANGES</strong>,
<strong>STAGED CHANGES</strong> and
<strong>MERGE CHANGES</strong>.
</p>
<p>
Clicking each item will show you in detail
<strong>the textual changes within each file</strong>. Note
that for unstaged changes, the editor on the right still lets
you edit the file: feel free to use it!
</p>
<p>
You can also find indicators of the
<strong>status of your repository</strong> in the bottom left
corner of VS Code: the <strong>current branch</strong>,
<strong>dirty indicators</strong> and the number of
<strong>incoming and outgoing commits</strong> of the current
branch. You can <strong>checkout</strong> any branch in your
repository by clicking that status indicator and selecting the
Git reference from the list.
</p>
<blockquote>
<p>
<strong>Tip:</strong> You can open VS Code in a
sub-directory of a Git repository. VS Code's Git services
will still work as usual, showing all changes within the
repository, but file changes outside of the scoped directory
are shaded with a tool tip indicating they are located
outside the current workspace.
</p>
</blockquote>
<h2 id="git-status-bar-actions">Git Status Bar Actions</h2>
<p>
There is a <strong>Synchronize Changes</strong> action in the
Status Bar, next to the branch indicator, when the current
checked out branch has an upstream branch configured.
<strong>Synchronize Changes</strong> will pull remote changes
down to your local repository and then push local commits to
the upstream branch.
</p>
<p>
<img
alt="git status bar sync"
src="../images/versioncontrol/git-status-bar-sync.png"
/>
</p>
<p>
If there is no upstream branch configured and the Git
repository has remotes set up, the
<strong>Publish</strong> action is enabled. This will let you
publish the current branch to a remote.
</p>
<p>
<img
alt="git status bar publish"
src="../images/versioncontrol/git-status-bar-publish.png"
/>
</p>
<h2 id="commit">Commit</h2>
<p>
<strong>Staging</strong> and <strong>unstaging</strong> can be
done via contextual actions in the files or by drag-and-drop.
</p>
<p>
You can type a commit message above the changes and press
<code>kbstyle(Ctrl+Enter)</code> (Mac:
<code>kbstyle(⌘+Enter)</code>) to commit them. If there are
any staged changes, only those will be committed, otherwise
all changes will be committed.
</p>
<p>
We've found this to be a great workflow. For example, in the
previous screenshot, only the <code>config.js</code> file will
be included in the commit. A consecutive commit action would
commit both <code>vinyl-zip.js</code> and
<code>tests.js</code> in a separate commit.
</p>
<p>
More specific <strong>commit actions</strong> can be found in
the <code>...</code> menu on the top of the Git view.
</p>
<h2 id="cloning-a-repository">Cloning a repository</h2>
<p>
You can clone a Git repository with the
<strong>Git: Clone</strong> command in the
<strong>Command Palette</strong>