They would need a way to track changes to determine who wrote each part and integrate their individual stories into the main one. All of this can essentially simplify the progress of the entire project. After some work by our imagined writers, we could observe their workflow.
Basic Git commands
To initialize a repository, we use git init. This command creates a folder. If you don't see it immediately in your folder path, it might be hidden in Windows. You can reveal it by selecting the option to show hidden files, and then you will be able to see the .git folder.
After initialization, to move from "modified" to "staged," we use the git add command. To transition from "staged" to "committed," we use the git commit command.
So let’s go through all commands at once when pushing new changes:
1. git init
2. git add . // add your changes
3. git commit -m “commit message” // commit changes with message
4. git push origin <branch name> // push to remote repo
Create remote repository
Currently, one of the popular web-based version control platforms is GitHub. Let's dive into it by creating your first repository and committing your changes on GitHub.
Once you log into your GitHub account, you can find a button to create a new repository.
Here, you can start by choosing a descriptive name for your repository. In the description field, you can provide, for example, information about the technologies used in the repository. If it's a public repository, including relevant keywords in the description can make it easier for others to discover.
The next option allows you to choose whether your repository will be Public or Private. If it's private, only you and your team or organization can access the source code. If it's public, anyone can view, clone, or fork the repository.
Following that, there's an option to initialize the readme file. You can choose to add it or ignore it at this stage; it doesn't make a significant difference.
Finally, there's an option to select a license. This informs others about what they can do with your code. Common licenses include the MIT License, which permits the use, copying, modification, merging, publishing, distribution, sublicensing, and selling of copies of your software. You can choose to skip this part if you prefer.
git remote add origin “your repo” //Copy SSH
And last thing is to push
git push “origin master”
That's it you now have your code on a remote repository.
Git rebase
Git rebase is a command in Git that allows you to rewrite the commit history of a branch by incorporating changes from another branch.
In other words rebase means moving your branch's starting point to a different commit. It's like pretending you began your work from that new point.
git rebase <base>
most of time will be :
git rebase master
After this command you can see visually
by Fredrik V. Mørken
There is good observation of this problem which is:
“I’ve come to the conclusion that it’s about vanity. Rebasing is a purely aesthetic operation. The apparently clean history appeals to us as developers, but it can’t be justified, from a technical nor functional standpoint.”
Git merge
Git merge is combining changes from one branch into another. Typically, you'd merge code from a feature branch into the main branch (or master). It's a way to blend the separate work histories, making sure the latest updates from a feature are included in the main project.
Consider a scenario where there exists a file named test.js in the main branch of a project. Now, envision two developers who have been independently working on different branches within the same project. Each developer has made changes to the test.js file on their branches. Developer A successfully merges their changes into the main branch. Then, Developer B attempts to merge their modifications into the main branch as well. Consequently, Git detects conflicting changes and creates a merge conflict in the test.js file. Now Developer B must resolve conflicts to merge their branch successfully. Typically, this involves using some IDE that provides visual tools to identify and resolve conflicts effectively.
Git can also automatically merge changes when the commits occur on separate lines or branches.
In Conclusion
We've covered the basic usage of Git, but it's important to note that Git offers a wealth of additional features and functionalities that go well beyond what was explained here so far.

SOCIAL SHARE CARD GENERATOR