0

We have some Unix scripts in Github Repository.I do not see any File Locking feature on github.How to implement in github?Let us say two users downloaded the File1.txt at same time and working on the File1.txt. user1 completed the development and committed to the github Repository.Now, User2 lost the changes done by User1 on File.txt.

  • This is not how versioning systems work. Their main concern is to **not** lose the changes of User2 but merge them with the changes operated by User1. Read the [Git book](https://git-scm.com/book/en/v2). – axiac Mar 27 '18 at 12:04
  • Both users downloaded the File1.txt at the same time.Both are working different feature.How to combine two features?.Do we have lock Mechanism in github? – user3663615 Mar 27 '18 at 12:18
  • Locking doesn't prevent conflicts. – axiac Mar 27 '18 at 12:21
  • Possible duplicate of [Git for beginners: The definitive practical guide](https://stackoverflow.com/questions/315911/git-for-beginners-the-definitive-practical-guide) – phd Mar 27 '18 at 15:41
  • You need merge, not locking. – phd Mar 27 '18 at 15:42
  • Do you mean user1 and user2 should clone the Repository.Both users should create pull request.First we will merge the Pullrequest of User1 with master branch and then we will merge the Pullrequest of User2 on top of user1.Please correct me if i am wrong – user3663615 Mar 29 '18 at 15:11

0 Answers0