수색…


민감한 데이터를 제거하는 프로젝트를 github 저장소에 게시하기

이 예제의 단계에서는 다음 프로젝트 구조를 데모로 사용합니다.
더미 솔루션

우리는 그것을 "GHTuts"저장소로 내보낼 것입니다 [Repo는 아직 github에 존재하지 않지만 암호가 들어있는 공개 키없이 "SensitiveProject"를 그대로 두십시오.

  1. 우선 우리는 소스 컨트롤 플러그인이 "Tools> Options> Plug-in Selection"에서 "Git"으로 설정되어 있는지 확인합니다. 여기에 이미지 설명을 입력하십시오.
  2. "팀 탐색기"탭을 볼 수 없다면 다음과 같이 Visual Studio에서 봅니다. 여기에 이미지 설명을 입력하십시오.

  1. 로컬 솔루션 폴더로 이동하여 ".gitignore.txt"라는 새 파일을 만듭니다. [참고]이 단계는 프로젝트에 중요한 정보가있는 경우에만 중요합니다. 그렇지 않으면 Visual Studio에서 자동으로 만듭니다

  2. 이제 ".gitignore.txt"파일을 열고 붙여 넣으십시오.이 파일은 일반적인 비주얼 스튜디오 파일을 무시하는 템플릿입니다 (아래 링크 참조).

## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.

# User-specific files
*.suo
*.user
*.userosscache
*.sln.docstates

# User-specific files (MonoDevelop/Xamarin Studio)
*.userprefs

# Build results
[Dd]ebug/
[Dd]ebugPublic/
[Rr]elease/
[Rr]eleases/
x64/
x86/
bld/
[Bb]in/
[Oo]bj/
[Ll]og/

# Visual Studio 2015 cache/options directory
.vs/
# Uncomment if you have tasks that create the project's static files in wwwroot
#wwwroot/

# MSTest test Results
[Tt]est[Rr]esult*/
[Bb]uild[Ll]og.*

# NUNIT
*.VisualState.xml
TestResult.xml

# Build Results of an ATL Project
[Dd]ebugPS/
[Rr]eleasePS/
dlldata.c

# DNX
project.lock.json
project.fragment.lock.json
artifacts/

*_i.c
*_p.c
*_i.h
*.ilk
*.meta
*.obj
*.pch
*.pdb
*.pgc
*.pgd
*.rsp
*.sbr
*.tlb
*.tli
*.tlh
*.tmp
*.tmp_proj
*.log
*.vspscc
*.vssscc
.builds
*.pidb
*.svclog
*.scc

# Chutzpah Test files
_Chutzpah*

# Visual C++ cache files
ipch/
*.aps
*.ncb
*.opendb
*.opensdf
*.sdf
*.cachefile
*.VC.db
*.VC.VC.opendb

# Visual Studio profiler
*.psess
*.vsp
*.vspx
*.sap

# TFS 2012 Local Workspace
$tf/

# Guidance Automation Toolkit
*.gpState

# ReSharper is a .NET coding add-in
_ReSharper*/
*.[Rr]e[Ss]harper
*.DotSettings.user

# JustCode is a .NET coding add-in
.JustCode

# TeamCity is a build add-in
_TeamCity*

# DotCover is a Code Coverage Tool
*.dotCover

# NCrunch
_NCrunch_*
.*crunch*.local.xml
nCrunchTemp_*

# MightyMoose
*.mm.*
AutoTest.Net/

# Web workbench (sass)
.sass-cache/

# Installshield output folder
[Ee]xpress/

# DocProject is a documentation generator add-in
DocProject/buildhelp/
DocProject/Help/*.HxT
DocProject/Help/*.HxC
DocProject/Help/*.hhc
DocProject/Help/*.hhk
DocProject/Help/*.hhp
DocProject/Help/Html2
DocProject/Help/html

# Click-Once directory
publish/

# Publish Web Output
*.[Pp]ublish.xml
*.azurePubxml
# TODO: Comment the next line if you want to checkin your web deploy settings
# but database connection strings (with potential passwords) will be unencrypted
*.pubxml
*.publishproj

# Microsoft Azure Web App publish settings. Comment the next line if you want to
# checkin your Azure Web App publish settings, but sensitive information contained
# in these scripts will be unencrypted
PublishScripts/

# NuGet Packages
*.nupkg
# The packages folder can be ignored because of Package Restore
**/packages/*
# except build/, which is used as an MSBuild target.
!**/packages/build/
# Uncomment if necessary however generally it will be regenerated when needed
#!**/packages/repositories.config
# NuGet v3's project.json files produces more ignoreable files
*.nuget.props
*.nuget.targets

# Microsoft Azure Build Output
csx/
*.build.csdef

# Microsoft Azure Emulator
ecf/
rcf/

# Windows Store app package directories and files
AppPackages/
BundleArtifacts/
Package.StoreAssociation.xml
_pkginfo.txt

# Visual Studio cache files
# files ending in .cache can be ignored
*.[Cc]ache
# but keep track of directories ending in .cache
!*.[Cc]ache/

# Others
ClientBin/
~$*
*~
*.dbmdl
*.dbproj.schemaview
*.pfx
*.publishsettings
node_modules/
orleans.codegen.cs

# Since there are multiple workflows, uncomment next line to ignore bower_components
# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
#bower_components/

# RIA/Silverlight projects
Generated_Code/

# Backup & report files from converting an old project file
# to a newer Visual Studio version. Backup files are not needed,
# because we have git ;-)
_UpgradeReport_Files/
Backup*/
UpgradeLog*.XML
UpgradeLog*.htm

# SQL Server files
*.mdf
*.ldf

# Business Intelligence projects
*.rdl.data
*.bim.layout
*.bim_*.settings

# Microsoft Fakes
FakesAssemblies/

# GhostDoc plugin setting file
*.GhostDoc.xml

# Node.js Tools for Visual Studio
.ntvs_analysis.dat

# Visual Studio 6 build log
*.plg

# Visual Studio 6 workspace options file
*.opt

# Visual Studio LightSwitch build output
**/*.HTMLClient/GeneratedArtifacts
**/*.DesktopClient/GeneratedArtifacts
**/*.DesktopClient/ModelManifest.xml
**/*.Server/GeneratedArtifacts
**/*.Server/ModelManifest.xml
_Pvt_Extensions

# Paket dependency manager
.paket/paket.exe
paket-files/

# FAKE - F# Make
.fake/

# JetBrains Rider
.idea/
*.sln.iml
  1. 민감한 프로젝트 폴더를 ".gitignore.txt"파일에 # 포함하지 않는 모든 줄에 추가하십시오. 그래서 맨 끝에 추가하면 다음과 같이 보일 것입니다.

여기에 이미지 설명을 입력하십시오.

  1. 솔루션을 마우스 오른쪽 버튼으로 클릭하고 "소스 제어에 솔루션 추가 ..."를 선택하십시오. 여기에 이미지 설명을 입력하십시오. [참고] 계속하기 전에 솔루션을 저장하라는 메시지가 표시 될 수 있습니다.

  2. 이제 VS에서 읽을 수 있지만 github Repo가없는 "로컬"git Repo가 있으며 git 및 빨간색 원에 추가 된 솔루션의 각 파일 옆에 작은 파란색 잠금 아이콘이 표시됩니다 무시 된 프로젝트에서
    여기에 이미지 설명을 입력하십시오.

    [노트]
    .gitignore 파일에 대한 자세한 내용은 다음 링크를 확인하십시오.

  1. "팀 탐색기"탭으로 이동 한 다음 "동기화"

  2. 이제 vs에서 github에 이르기까지 repo를 만들고 '시작하기'버튼을 누릅니다. 여기에 이미지 설명을 입력하십시오.

  3. 이제 새로운 Repo에 대한 정보를 github에 입력 한 다음 '게시'를 클릭하십시오. 여기에 이미지 설명을 입력하십시오.

  4. 지금 우리가 github에 갈 때 우리는 우리 지역의 repo가 ​​우리 민감한 프로젝트없이 github에 출판되는 것을 본다 [주]
    레포의 URL은 다음과 같이 보일 것입니다.
    https://github.com/<user name>/<repo name>



Modified text is an extract of the original Stack Overflow Documentation
아래 라이선스 CC BY-SA 3.0
와 제휴하지 않음 Stack Overflow