Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Prochaine révision
Révision précédente
brasil:courses:git_gitlab:1_git_gitlab_prerequisites [2026/08/11 15:07] – créée yannbrasil:courses:git_gitlab:1_git_gitlab_prerequisites [2026/08/12 13:07] (Version actuelle) yann
Ligne 1: Ligne 1:
 +<note tip>
 +**Get an offline copy of this page by clicking the libreoffice writer icon** ~~ODT~~
 +</note>
 ====== Git/Gitlab courses UFU 2026 ====== ====== Git/Gitlab courses UFU 2026 ======
  
 {{:brasil:courses:git-logo.png?200|}}{{:brasil:courses:gitlab.png?300}} {{:brasil:courses:git-logo.png?200|}}{{:brasil:courses:gitlab.png?300}}
 +
 +{{ :brasil:courses:git_gitlab:gitgitlabillustration.png?600 |}}
  
 ====== Prerequisites====== ====== Prerequisites======
 +
 +<note importante>
 +**To install WSL or WSL2 you need Windows 10 or 11.**
 +</note>
 ===== Install Windows Subsystem for Linux (WSL) ===== ===== Install Windows Subsystem for Linux (WSL) =====
  
Ligne 180: Ligne 189:
 {{ :brasil:courses:wslfiles.png |}} {{ :brasil:courses:wslfiles.png |}}
  
 +===== Copy/Paste/Move files from a system to another : Zone.Identifier files =====
 +
 +Zone.Identifier files in WSL are sidecar metadata files created when you copy or move a file downloaded from the internet on Windows into your Windows Subsystem for Linux (WSL) filesystem. 
 +
 +
 +Windows natively tracks downloaded files using a security feature called Mark of the Web (MOTW). Because Linux filesystems do not support this specific Windows feature, WSL extracts that hidden data and saves it as a separate visible file.
 +
 +Zone.Identifier files are a security metadata mechanism introduced by Windows to mark files downloaded from untrusted locations, like the internet. On Windows NTFS drives, this data is hidden inside an Alternate Data Stream (ADS). However, when you move or copy these files into a Linux filesystem via the Windows Subsystem for Linux (WSL), Linux treats this stream as a separate, visible file. These files often clutter directories and can break Linux scripts due to the colons in their filenames.You can safely delete existing identifier files, prevent Windows from creating them, or force your Git repository to ignore them.
 +
 +==== Delete Existing Files Recursively ====
 +
 +To clean up clutter in your current WSL directory, you can safely scan and remove them using the Linux find command:
 +<code bash>
 +find . -name "*:Zone.Identifier" -type f -delete
 +</code>
 +
 +<note>
 +Tip: If you want to make this easier, you can add 
 +<code bash>
 +alias purge-zone='find . -name "*:Zone.Identifier" -type f -delete'
 +</code> to your ''~/.bashrc file''.
 +</note>
 +
 +==== Disable Creation via Windows Group Policy ====
 +
 +You can stop Windows from generating this data globally so that future file transfers do not create new identifier files:
 +  * Press Win + R, type ''gpedit.msc'', and press ''Enter''.
 +  * Navigate to: ''User Configuration > Administrative Templates > Windows Components > Attachment Manager''.
 +  * Open Do not preserve zone information in file attachments.
 +  * Set the policy to ''Enabled'', click Apply, and select OK.
 +
 +==== Disable Creation via Windows Registry ====
 +
 +If you are using Windows Home edition and lack the Group Policy Editor, you can use the Registry Editor to achieve the same result:
 +  * Press Win + R, type ''regedit'', and press ''Enter''.
 +  * Navigate to: ''HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\AttachmentsNote'': If the Attachments key does not exist, right-click Policies, select ''New > Key'', and name it ''Attachments''.
 +  * Right-click inside the Attachments folder, select ''New > DWORD (32-bit) Value'', and name it ''SaveZoneInformation''.
 +  * Double-click ''SaveZoneInformation'' and change its value data to 1.
 +
 +==== Hide Files from Git Repositories ====
 +
 +If these files frequently pop up in your project work and you want to prevent them from being committed to Git, add them to your tracking block:
 +  * Add the following line to your project's ''.gitignore'' file: ''text*:Zone.Identifier''
 ===== Interoperability ===== ===== Interoperability =====
  
Ligne 247: Ligne 299:
   * Keep the first line under 50 characters and do not add a period at the end.   * Keep the first line under 50 characters and do not add a period at the end.
   * Append ! after the type/scope (e.g., feat(api)!:) to signal a breaking change.   * Append ! after the type/scope (e.g., feat(api)!:) to signal a breaking change.
 +
 +====== Using Git with windows ======
 +{{ :brasil:courses:git_gitlab:logo2x.png |}}
 +
 +To use git directly with windows, you need to install it from https://git-scm.com/install/windows
 +
 +Inside windows explorer you can access git using a gui or a shell bash as viewed in this courses :
 +
 +{{ :brasil:courses:git_gitlab:git_explorer_context.png |}}
 +
 +{{ :brasil:courses:git_gitlab:git_gui.png |}}
 +
 +{{ :brasil:courses:git_gitlab:git_bash.png |}}
 +
brasil/courses/git_gitlab/1_git_gitlab_prerequisites.1786453627.txt.gz · Dernière modification : de yann
CC Attribution-Share Alike 4.0 International
Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0