Step 1 is to create a gitignore file in that directory. So open Git Bash in the desired directory. Then use the command below to accomplish the task.
Here you can add name of files or folders which you don't want to add in your github repository. Adding the file name or file directory name will simply ignore that file or file directory.
Step 2 is to Initialise. So use the command below to initialize.
Step 3 is to add content to staging area. So use the command below to add all the content to staging area and prepare all the content to be added to your repository.
Remember all the files except the file names added in the gitignore file will be added to the staging area.
Step 4 is to make our first commit. So use the command below to make a commit. Here i called my first commit as "Initial Commit" you can call it "First Commit" or whatever you like.
Step 4 is an optional step, but i insist you to perform this step so that you can check that every thing is working fine.
You will see the following result after executing the command on you Git Bash.
Step 4 is to tell our Git Bash about the desired Github repository, in which we want to add the files and folders.
Step 4 is the last step in which we all the desired files and folders to our Github Repository. You the command below to accomplish the task.
Now you will see your being uploaded to your Github Repository.
Comments
Post a Comment