class_docstr: PyGit class represents a git repo within a weigit repo.
  
  Args:
      parent_path (pathlib.Path)
          Has to be the full path of the parent!
      gitignore (List)
          a list of files to be added to the .gitignore
      name (str)
          Name of the author of the git repo. Optionally used if it can't be determined from user's .gitconfig.
      email (str)
          email address of the author of the git repo
docstr: Initializes a .git within .wgit directory, making it a git repo.
  
  Args:
      gitignore (List)
          a list of file paths to be ignored by the wgit git repo.
docstr_tok: ["Initializes","a",".git","within",".wgit","directory",",","making","it","a","git","repo",".","Args",":","gitignore","(","List",")","a","list","of","file","paths","to","be","ignored","by","the","wgit","git","repo","."]
code: def _init_wgit_git(self, gitignore: List) -> None:
      """
      Initializes a .git within .wgit directory, making it a git repo.
  
      Args:
          gitignore (List)
              a list of file paths to be ignored by the wgit git repo.
      """
      self.repo = pygit2.init_repository(str(self._parent_path), False)
      self.path = self._parent_path.joinpath(".git")
  
      # create and populate a .gitignore
      self._parent_path.joinpath(".gitignore").touch(exist_ok=False)
  
      with open(self._parent_path.joinpath(".gitignore"), "a") as file:
          for item in gitignore:
              file.write(f"{item}\n")
  
file_path: fairscale/fairscale/experimental/wgit/pygit.py
imports: from pathlib import Path
  import subprocess
  import sys
  from typing import Dict, List, Tuple
  import pygit2
label_desc: Use image node_id 2 for calling the PyGit obj's underlying member method code with example usage: obj._init_wgit_git(gitignore) without return types