Skip to content

zied-snoussi/git-test

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

50 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Git Test

Github

Description

This repository serves as a testbed for learning and practicing Git and GitHub workflows.

Table of Contents

Getting Started

To get started with this project, follow the steps below.

Prerequisites

Ensure you have the following installed:

  • Git
  • Code editor of your choice

Installation

  1. Clone the repository:
git clone https://github.com/zied-snoussi/git-test.git
  1. Navigate to the project directory:
cd git-test

Usage

Instructions on how to use the project will be added here.

Contributing

Contributions are welcome! Please refer to the CONTRIBUTING.md file for guidelines.

License

This project is licensed under the MIT License.


Using GitHub and Git

How to Use GitHub

  1. Create a Repository: Click on the "+" icon in the top-right corner of GitHub and select "New repository". Fill in the necessary details and click "Create repository".

  2. Clone a Repository: To clone a repository to your local machine, use the git clone command followed by the repository URL.

git clone https://github.com/zied-snoussi/git-test.git
  1. Commit Changes: Use git add . to stage all changes, then git commit -m "Your message" to commit them.
git add .
git commit -m "Your message"
  1. Push Changes: Push your changes to the remote repository using git push.
git push origin <branch-name>
  1. Create Pull Requests: If you're working on a forked repository, create a pull request to propose changes to the original repository.

Resolving Conflicts

  1. Fetch Changes: Fetch changes from the remote repository to ensure your local repository is up to date.
git fetch origin
  1. Merge Changes: Merge changes from the remote repository into your local branch.
git merge origin/<branch-name>
  1. Resolve Conflicts: If there are conflicts, open the conflicted file(s) in your code editor. Edit the file(s) to resolve conflicts, then add and commit the changes.
git add .
git commit -m "Resolve conflicts"
  1. Push Changes: Push the resolved changes to the remote repository.
git push origin <branch-name>
  1. Update Pull Request: If resolving conflicts for a pull request, update the pull request on GitHub with the resolved changes.
git push origin <branch-name> --force
git push origin <branch-name> --force
  1. Rebase Changes: Alternatively, you can rebase your changes on top of the latest changes from the remote repository.
git rebase origin/<branch-name>
  1. Resolve Conflicts: If there are conflicts during the rebase process, follow the same steps mentioned earlier to resolve them.

  2. Complete Rebase: After resolving conflicts, continue the rebase process by running:

git rebase --continue
  1. Push Changes: Finally, push the rebased changes to the remote repository.
git push origin <branch-name> --force

By following these steps, you should be able to effectively resolve conflicts and keep your local and remote repositories in sync.

About

This repository serves as a testbed for learning and practicing Git and GitHub workflows.

Topics

Resources

Security policy

Stars

Watchers

Forks

Sponsor this project

Packages

No packages published

Languages