Answers for "how to make a folder into git repo"

26

how to create folder in github

You cannot create an empty folder and then add files to that folder, 
but rather creation of a folder must happen together with adding of 
at least a single file. On GitHub you can do it this way:

    Go to the folder inside which you want to create another folder
    Click on New file
    On the text field for the file name, first write the folder 
    	name you want to create
    Then type /. This creates a folder
    You can add more folders similarly
    Finally, give the new file a name 
    	(for example, .gitkeep which is conventionally used 
        	to make Git track otherwise empty folders; it is 
            	not a Git feature though)
    Finally, click Commit new file.
Posted by: Guest on March-24-2020
3

how to make a folder into git repo

$ git remote add origin [email protected]:username/new_repo
$ git push -u origin master
Posted by: Guest on August-17-2020
0

turn a folder into a git repo

$ git filter-branch --prune-empty --subdirectory-filter FOLDER-NAME  BRANCH-NAME 
  # Filter the specified branch in your directory and remove empty commits
  > Rewrite 48dc599c80e20527ed902928085e7861e6b3cbe6 (89/89)
  > Ref 'refs/heads/BRANCH-NAME' was rewritten
Posted by: Guest on August-24-2020

Code answers related to "how to make a folder into git repo"

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language