To add files to your Git repository, follow these steps:
Navigate to your repository: Open your terminal and change to your project directory:
cd /home/labex/project/my-time-machineCreate or modify files: You can create a new file or modify an existing one. For example, to create a new file:
echo "Hello, World!" > hello.txtAdd files to the staging area: Use the
git addcommand to stage the file(s) you want to include in your next commit. To add a specific file:git add hello.txtTo add all files in the directory:
git add .Check the status (optional): You can check which files are staged for commit by running:
git statusCommit the changes: Finally, commit the staged files with a message:
git commit -m "Add hello.txt file"
This process will add your files to the repository and save the changes. Let me know if you need further assistance!
