Coder Social home page Coder Social logo

plpbasicgitassignment's Introduction

PLPBasicGitAssignment

  • This guide provides a clear explanation of how to set up a Git repository, make changes, and push them to GitHub for version control.

    Task 1: Repository Setup

  • Log in to your GitHub account.

  • Click the green "New repository" button.

  • Name your repository "PLPBasicGitAssignment".

  • Check the box to "Initialize this repository with a README".

  • Click "Create repository".

Task 2: Local Setup

  • Create a new folder on your desktop or preferred location named "PLPBasicGitAssignment".
  • Open your terminal or command prompt application.
  • Use the cd command to navigate to your newly created folder. For example, if your folder is on the desktop, you might type cd Desktop/PLPBasicGitAssignment.

Task 3: Git Initialization

  • In the terminal, type the following command and press enter: git init
  • This creates a new Git repository in your local folder.

Task 4 : Connecting to GitHub

  • In your terminal, locate the URL of your GitHub repository. It should look something like https://github.com//PLPBasicGitAssignment (replace with your actual username).
  • Type the following command in your terminal, replacing with the actual URL you copied: git remote add origin <repository-url>
  • This links your local repository to the one on GitHub.

Task 5: Making Changes

Create a File:

  • Inside your local folder ("PLPBasicGitAssignment"), create a new text file using a text editor eg VsCode.
  • Name it "hello.txt".
  • Open the file and add a simple message like "Hello, this is my first Git repository!".
  • Save the file.

Committing Changes:

  • In your terminal, type the following command to stage the changes (add the file to the next commit): git add hello.txt
  • Type the following command to commit the changes: git commit -m "Add hello.txt with a greeting"

Task 6: Pushing to GitHub

  • Type the following command to push your committed changes to the GitHub repository: git push -u origin main
  • This command pushes the changes in your local "main" branch to the "main" branch on your GitHub repository.
  • The -u flag sets the upstream branch, making future pushes easier.

plpbasicgitassignment's People

Contributors

mudash-dev avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.